Docker is the world’s leading software containerization platform. You can easily run you Jooby app as a docker container. You need to have the docker engine installed.
You need docker installed on the building machine.
Maven users have two options: one for a building a fat jar and one for building a stork distribution.
Gradle users might want to choose one of the available plugins.
-
Write a
src/etc/docker.activatorfile. File contents doesn't matter, the file presence activates a Maven profile. -
Open a terminal and run:
mvn clean package docker:build-
Once finished, the docker image has been built and tagged as
${project.artifactId}. -
You can now run the image with:
docker run -p 80:8080 ${project.artifactId}The Maven profile triggers the spotify/docker-maven-plugin which generates a docker file. Please see the doc for more details.
-
Write a
src/etc/docker.stork.activatorfile. File contents doesn't matter, the file presence activates a Maven profile. -
Open a terminal and run:
mvn clean package docker:build-
Once finished, the docker image has been built and tagged as
${project.artifactId}. -
You can now run the image with:
docker run -it -p 80:8080 ${project.artifactId}The Maven profile triggers the spotify/docker-maven-plugin which generates a docker file. Please see the doc for more details.