Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I declare multiple maintainers in my Dockerfile?

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?

like image 495
amacleod Avatar asked Aug 11 '16 15:08

amacleod


People also ask

Can a Dockerfile have multiple Entrypoints?

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.

Can you have multiple froms in 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.

How do I make multiple Dockerfiles?

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.

Can I run multiple services in a container?

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.


1 Answers

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..

like image 139
Harald Albers Avatar answered Oct 06 '22 01:10

Harald Albers