Skip to content

Instantly share code, notes, and snippets.

@adamw
Created June 6, 2014 08:09
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save adamw/166b82ec04c9c0f67453 to your computer and use it in GitHub Desktop.
# VERSION 1.0
# the base image is a trusted ubuntu build with java 7 (https://index.docker.io/u/dockerfile/java/)
FROM dockerfile/java
# that's me!
MAINTAINER Adam Warski, adam@warski.org
# we need this because the workdir is modified in dockerfile/java
WORKDIR /
# run the (java) server as the daemon user
USER daemon
# copy the locally built fat-jar to the image
ADD target/myapp-assembly-1.0-deps.jar /app/deps.jar
ADD target/myapp-assembly-1.0.jar /app/app.jar
# run the server when a container based on this image is being run
ENTRYPOINT [ "java", "-cp", "/app/deps.jar:/app/app.jar" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment