Skip to content

Instantly share code, notes, and snippets.

@evandbrown
Created April 23, 2014 21:15
Show Gist options
  • Save evandbrown/11232711 to your computer and use it in GitHub Desktop.
Save evandbrown/11232711 to your computer and use it in GitHub Desktop.
Dockerfile for Spring Boot
FROM dockerfile/java
# Assumes your-app.jar is in the same dir as Dockerfile when you do a `docker build .`
ADD your-app.jar /src/
# Also assumes your app exposes port 8080
EXPOSE 8080
# Run it!
CMD ["java", "-jar", "/src/your-app.jar"]
@evandbrown
Copy link
Author

Put this in a directory with your-app.jar, zip the two files (not the directory that contains them), and deploy to EB.

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