March 2018
Intermediate to advanced
380 pages
9h 23m
English
A Dockerfile is a set of instructions that tells Docker how to build a Docker image. By running the docker build command on a specific Dockerfile, we will produce a docker image that can be used to create Docker containers. Existing docker images can be used as a base for new Dockerfiles, hence letting you reuse and extend existing images.
The following code is from the Dockerfile of our application:
FROM openjdk:8-jre-alpineENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \ JHIPSTER_SLEEP=0 \ JAVA_OPTS=""CMD echo "The application will start in ${JHIPSTER_SLEEP}s..." && \ sleep ${JHIPSTER_SLEEP} && \ java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /app.warEXPOSE 8080 5701/udpADD *.war /app.war
The FROM instruction specifies ...