January 2020
Intermediate to advanced
428 pages
10h 34m
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 is what a Dockerfile of our application would look like:
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 ...
Read now
Unlock full access