jaegertracing / jaeger

CNCF Jaeger, a Distributed Tracing Platform
https://www.jaegertracing.io/
Apache License 2.0
20.61k stars 2.45k forks source link

Allow running containers without overriding command line #802

Closed yurishkuro closed 6 years ago

yurishkuro commented 6 years ago

Currently Dockerfiles are using a mix of ENTRYPOINT and CMD. If we change the ENTRYPOINT to always point to the executable, and CMD to point to the default arguments (like all for hotrod image), then the containers can be run as executables with additional parameters overriding the CMD, but not overriding ENTRYPOINT.

E.g. hotrod's Dockerfile should have

ENTRYPOINT ["/go/bin/hotrod-linux"]
CMD ["all"]

while all other binaries should have just the ENTRYPOINT pointing to the binary.

The main benefit is that when users run the image and pass additional arguments, they don't need to know the name of the binary inside the image.

jpkrohling commented 6 years ago

I've been meaning to revamp our Docker images, applying some of the good practices shown during a presentation I watched a couple of months ago: https://de.slideshare.net/QAware/docker-und-kubernetes-patters-antipatterns (slide 15, it's in German but shouldn't be difficult to deduce what the good practices are).