Closed msgeissler closed 7 years ago
Could you please paste your entire CLI input and the complete response you get from Traefik?
I am using docker for traefik, so the CLI input should be provided by the docker image. The response I can see in the docker log is the help overview for traefik.
I just had a quick look at the dockerfile and noticed major differences between the normal and alpine dockerfile. The alpine one uses an entrypoint-script and defaults to the CMD --help. Maybe thats the problem? The normal dockerfile uses traefik directly as the entrypoint.
Do we have to manually overwrite the command used for the alpine images in contrast to the normal image?
Looking at the entrypoint script, it looks like you either have to pass an option or a sub-command in order to overwrite the default help screen. It does seem a bit inconvenient on first sight because you apparently can't fire off Traefik without any parameters at all (i.e., rely on defaults all the way).
@emilevauge can you confirm? Are we missing something? Should we try to make both Alpine and scratch Dockerfiles consistent with regards to the ENTRYPOINT / CMD parts?
Any update on the topic?
ping @emilevauge (see my last message above)
@msgeissler please add a subcommand. I add to do this in the alpine image to stay consistent with Docker guidelines: https://github.com/docker-library/official-images/pull/2367#issuecomment-261605158 Can I close this issue ?
@emilevauge sure. I guess this will be consistent across the different images and be updated in the docker-hub page in a future update?
The currently inconsistent behaviour between the images is still something I would consider a bug though (and is a problem according to the linked documentation).
i have the same problem. is there a work around? trying to trouble shoot an issues and i need terminal access.
thanks
@mdhwoods does adding a sub-command per Emile's suggestion help?
@timoreimann what subcommand would launch bash or traefik? tried docker run -d traefik:1.3.2-alpine /bin/bash is my syntex incorrect?
thanks
@timoreimann got it, just needed ash or traefik at the end. got it going.
@ldez AFAIU @emilevauge, the inconsistency isn't a bug but something that the conventions for the Alpine require us to do. Do you agree? If so, shall we close this issue, or is there anything else to do (maybe documenting things better)?
the inconsistency isn't a bug but something that the conventions for the Alpine require us to do
Not Alpine, but Docker images. As our main official image is based on from scratch, we cannot do docker run -it traefik:1.3.2 bash
, so this leads to inconsistencies between from scratch and alpine based image. That's why I was asked to add https://github.com/containous/traefik-library-image/blob/master/alpine/entrypoint.sh in the alpine image which by default, prints Traefik help without any flag. What do you suggest? Like in Alpine image, print help by default when no arg is given in the from scratch image (breaking change)?
I don't really understand this discussion. The readme on docker hub gives the following example:
docker run -d -p 8080:8080 -p 80:80 \
-v $PWD/traefik.toml:/etc/traefik/traefik.toml \
-v /var/run/docker.sock:/var/run/docker.sock \
traefik
This should work no matter what.
We use the same behavior as scratch on 1.3.8 for alpine.
All subsequent versions will work like that.
I wanted to switch from the v1.2.3 docker image to the v1.2.3-alpine image. Unfortunately I am unable to start the container with the alpine image.
The container quits with the following error: Error parsing command: pflag: help requested
Please note that traefik works fine when switching back to v1.2.3.