☰ See All Chapters |
Docker MAINTAINER command
Docker MAINTAINER command is specifically used to set the author details. When you inspect the image, you can see the MAIANTAINER value in Author details part. Whereas docker LABEL command can be used to attach any useful information also can be used to attach author information.
Docker MAINTAINER command Syntax
MAINTAINER <authour’s details> |
<authour’s details> can be in any text. However, it is strongly recommended that you use the image author's name and the e-mail address, as shown in the below example:
FROM openjdk:13-jdk-alpine LABEL maintainer="Manu Manjunatha <manu.m@java4coding.com>" LABEL description="This example Dockerfile installs NGINX." MAINTAINER Manu Manjunatha <manu.m@java4coding.com> ARG JAR_FILE=target/*.jar COPY ${JAR_FILE} app.jar ENTRYPOINT ["java","-jar","/app.jar"] |
MAINTAINER command can be kept anywhere in dockerfile, but it is convention to place it after FROM command.
When you inspect the docker image, below is how MAINTAINER value reflects:
All Chapters