Skip to content

Instantly share code, notes, and snippets.

@ericzumba
Last active August 8, 2016 22:15
Show Gist options
  • Save ericzumba/2c0716f59bf8a8142be7ef62cb4ff808 to your computer and use it in GitHub Desktop.
Save ericzumba/2c0716f59bf8a8142be7ef62cb4ff808 to your computer and use it in GitHub Desktop.
simple docker image
PROJECT_DIR=$(shell pwd)
ARTIFACT_REVISION=1.0
ARTIFACT_NAME=example
ARTIFACT=$(PROJECT_DIR)/build/libs/$(ARTIFACT_NAME)-$(ARTIFACT_REVISION).jar
GRADLE_VERSION?=2.13
GRADLE_IMAGE=vivareal/gradle:$(GRADLE_VERSION)
GRADLE=docker run -v $(PROJECT_DIR):/project -i $(GRADLE_IMAGE)
$(ARTIFACT):
$(GRADLE) clean build
build: $(ARTIFACT)
image: build
docker build -t vivareal/example:$(ARTIFACT_REVISION) .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment