Skip to content

Instantly share code, notes, and snippets.

@tinmegali
Last active June 3, 2018 17:20
Show Gist options
  • Save tinmegali/5f5f09de98f1ead145fb418c25b943dd to your computer and use it in GitHub Desktop.
Save tinmegali/5f5f09de98f1ead145fb418c25b943dd to your computer and use it in GitHub Desktop.

Creating the image

./gradlew bootRepackage -Pprod buildDocker
  • bootRepackage: Builds an executable archive (WAR) file for the application
  • -Pprod: Specifies the profile to use
  • buildDocker: Builds a docker image based on the Dockerfile present in the src/main/dockerfolder

Running the image

docker-compose -f src/main/docker/app.yml up

This will also start the MySQL DB if you haven't started it already. If you already have it running from the previous step, then docker-compose will just skip it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment