![]() This will allow Maven to provide us with the name of the JAR file to package. We add an argument ARG JAR_FILE to parameterise the Docker image build. This will give us the latest Java JRE release based on the Alpine Linux distribution. You can see that we are basing image on the official openjdk:jre-alpine image. Dockerfileįirst create the Dockerfile to construct our image, as below: Dockerfile 1 2 3 4 5 6 7 8 9 10 11 12 13 14ĮNV _JAVA_OPTIONS "-Xms256m -Xmx512m =true"Īdduser -D -S -h /var/cache/bootapp -s /sbin/nologin -G bootapp bootappĮNTRYPOINT To build the source, you will need JDK 8+, and a Docker installation. mvnw package, your Docker image will be built. To make packaging as simple as possible, we will bind the Maven plugin’s build phases to the default build phases, so that when you type. This post is part of the “Spring Boot Primer” series. The natural build language for Docker images are Dockerfiles, so we will use Spotify’s Dockerfile Maven plugin. To package our application, we’re going to be using Docker.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |