How can I best indicate that there are multiple authors/maintainers of a docker image built using a Dockerfile
? If I include multiple separate MAINTAINER
commands, only the last one seems to take effect.
MAINTAINER Me Myself "[email protected]" MAINTAINER My Colleague "[email protected]"
Only mycolleague
shows up in the output of docker inspect
.
Should I use a comma delimited list in a single MAINTAINER
line? Is wanting to list two maintainers a boondoggle and I should just armwrestle my colleague to see whose email we put in the file?
The ENTRYPOINT command makes it so that apache2 starts when the container starts. I want to also be able to start mongod when the the container starts with the command service mongod start . According to the documentation however, there must be only one ENTRYPOINT in a Dockerfile.
With multi-stage builds, you use multiple FROM statements in your Dockerfile. Each FROM instruction can use a different base, and each of them begins a new stage of the build. You can selectively copy artifacts from one stage to another, leaving behind everything you don't want in the final image.
Let's say we have two Dockerfiles, one for building the backend and another for building the frontend. We can name them appropriately and invoke the build command two times, each time passing the name of one of the Dockerfiles: $ docker build -f Dockerfile.
It's ok to have multiple processes, but to get the most benefit out of Docker, avoid one container being responsible for multiple aspects of your overall application. You can connect multiple containers using user-defined networks and shared volumes.
You can only specify one MAINTAINER
instruction in a Dockerfile.
Furthermore, MAINTAINER
will be deprecated in the upcoming 1.13.0 release, see deprecations and this pull request.
The recommended solution is to use LABEL
instead, e.g.
LABEL authors="first author,second author"
Labels have a key=value
syntax. This means you cannot assign the same label more than once and you cannot assign multiple values to a given label. But you can combine multiple values into one with a syntax of your choice as illustrated in the example..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With