Created
March 2, 2017 07:38
-
-
Save watsh-rajneesh/cfb5b12e41ba150c892318e567adaffa to your computer and use it in GitHub Desktop.
Dockerize Java Application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use this base image for JDK 8 | |
# You can even use this image to set up maven and build from source the fat jar | |
# that you will execute below. | |
# See this for setting up maven - https://runnable.com/docker/java/dockerize-your-java-application | |
FROM sjsucohort6/oracle-java:8 | |
MAINTAINER Watsh Rajneesh <watsh.rajneesh@sjsu.edu> | |
WORKDIR /slackbot | |
# Use maven-shade-plugin to create a fat jar of your application which runs as a service | |
# see my gist on slackbot for example pom.xml or google it up. | |
ADD ./target/slackbot-1.0-SNAPSHOT.jar /slackbot | |
CMD ["java", "-jar", "slackbot-1.0-SNAPSHOT.jar"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment