Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Latest commit

 

History

History
51 lines (30 loc) · 1.8 KB

File metadata and controls

51 lines (30 loc) · 1.8 KB

docker

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.

usage

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.

fat jar

  • Write a src/etc/docker.activator file. 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.

stork

  • Write a src/etc/docker.stork.activator file. 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.