Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix traefik argument volumes #431

Closed
wants to merge 1 commit into from
Closed

Conversation

stepri
Copy link

@stepri stepri commented Aug 25, 2023

According to the docs you can mount volumes for the traefik with:

traefik:
  options:
    volumes:
      - /tmp/example.json:/tmp/example.json 

But it gaves the following error:

 ERROR (SSHKit::Command::Failed): Exception while executing on host 1.1.1.1: docker exit status: 125
docker stdout: Nothing written
docker stderr: unknown flag: --volumes
See 'docker run --help'.

Fixed in this PR.

@djmb
Copy link
Collaborator

djmb commented Sep 6, 2023

Hi @stepri, thanks for the PR!

There's a couple of test failures here, would you be able to look into them? 🙏

2023-08-31T16:13:10.6336088Z ..F
2023-08-31T16:13:10.6336563Z 
2023-08-31T16:13:10.6337477Z Failure:
2023-08-31T16:13:10.6338014Z CommandsTraefikTest#test_run_with_several_options_configured [/home/runner/work/kamal/kamal/test/commands/traefik_test.rb:63]:
2023-08-31T16:13:10.6338752Z --- expected
2023-08-31T16:13:10.6339492Z +++ actual
2023-08-31T16:13:10.6339898Z @@ -1 +1,3 @@
2023-08-31T16:13:10.6341249Z -"docker run --name traefik --detach --restart unless-stopped --publish 80:80 --volume /var/run/docker.sock:/var/run/docker.sock --log-opt max-size=\"10m\" --volume \"./letsencrypt/acme.json:/letsencrypt/acme.json\" --publish \"8080:8080\" --memory \"512m\" traefik:test --providers.docker --log.level=\"DEBUG\" --accesslog.format=\"json\" --api.insecure --metrics.prometheus.buckets=\"0.1,0.3,1.2,5.0\""
2023-08-31T16:13:10.6342172Z +# encoding: US-ASCII
2023-08-31T16:13:10.6342389Z +#    valid: true
2023-08-31T16:13:10.6343400Z +"docker run --name traefik --detach --restart unless-stopped --publish 80:80 --volume /var/run/docker.sock:/var/run/docker.sock --log-opt max-size=\"10m\" --volumes \"./letsencrypt/acme.json:/letsencrypt/acme.json\" --publish \"8080:8080\" --memory \"512m\" traefik:test --providers.docker --log.level=\"DEBUG\" --accesslog.format=\"json\" --api.insecure --metrics.prometheus.buckets=\"0.1,0.3,1.2,5.0\""
2023-08-31T16:13:10.6344039Z 
2023-08-31T16:13:10.6344045Z 
2023-08-31T16:13:10.6344264Z bin/test home/runner/work/kamal/kamal/test/commands/traefik_test.rb:57
2023-08-31T16:13:10.6344464Z 
2023-08-31T16:13:10.6363565Z ....F
2023-08-31T16:13:10.6363742Z 
2023-08-31T16:13:10.6365222Z Failure:
2023-08-31T16:13:10.6365645Z CommandsTraefikTest#test_run_with_volumes_configured [/home/runner/work/kamal/kamal/test/commands/traefik_test.rb:52]:
2023-08-31T16:13:10.6366086Z --- expected
2023-08-31T16:13:10.6366276Z +++ actual
2023-08-31T16:13:10.6366495Z @@ -1 +1,3 @@
2023-08-31T16:13:10.6367462Z -"docker run --name traefik --detach --restart unless-stopped --publish 80:80 --volume /var/run/docker.sock:/var/run/docker.sock --log-opt max-size=\"10m\" --volume \"./letsencrypt/acme.json:/letsencrypt/acme.json\" traefik:test --providers.docker --log.level=\"DEBUG\" --accesslog.format=\"json\" --api.insecure --metrics.prometheus.buckets=\"0.1,0.3,1.2,5.0\""
2023-08-31T16:13:10.6368171Z +# encoding: US-ASCII
2023-08-31T16:13:10.6368375Z +#    valid: true
2023-08-31T16:13:10.6369327Z +"docker run --name traefik --detach --restart unless-stopped --publish 80:80 --volume /var/run/docker.sock:/var/run/docker.sock --log-opt max-size=\"10m\" --volumes \"./letsencrypt/acme.json:/letsencrypt/acme.json\" traefik:test --providers.docker --log.level=\"DEBUG\" --accesslog.format=\"json\" --api.insecure --metrics.prometheus.buckets=\"0.1,0.3,1.2,5.0\""
2023-08-31T16:13:10.6369895Z 
2023-08-31T16:13:10.6369911Z 
2023-08-31T16:13:10.6370067Z bin/test home/runner/work/kamal/kamal/test/commands/traefik_test.rb:46

@stepri
Copy link
Author

stepri commented Sep 6, 2023

Sorry, I was wrong. Let's update the documentation because docker expects "--volume" argument

@stepri stepri closed this Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants