Skip to content

Instantly share code, notes, and snippets.

@gilbertolptn
Last active June 10, 2020 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gilbertolptn/1a94195829357eab4116d141ede845aa to your computer and use it in GitHub Desktop.
Save gilbertolptn/1a94195829357eab4116d141ede845aa to your computer and use it in GitHub Desktop.
# Build to local docker
gradle build jibDockerBuild
# Run in local docker
docker run --rm -it -e SPRING_PROFILES_ACTIVE=local -p 8080:8080 IMAGE
# Build to TAR using arbitrary image
gradle build jibBuildTar -Djib.from.image=openjdk:11-jre --exclude-task test
# Load from tar
docker load --input=build/jib-image.tar
# Run with Spring+Mounting Volume /app
docker run --rm -it -v $PWD:/app docker run --rm -it -v $PWD:/app openjdk:11-jre bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment