Skip to content

Instantly share code, notes, and snippets.

@alessandrobologna
Last active February 25, 2018 17:23
Show Gist options
  • Save alessandrobologna/4e019ed8e8909be53a31528f25c746b1 to your computer and use it in GitHub Desktop.
Save alessandrobologna/4e019ed8e8909be53a31528f25c746b1 to your computer and use it in GitHub Desktop.
Simple Dockerfile
FROM openjdk:8-jdk-slim
# copy the application code in the container (in this case, a fat jar)
COPY target/application.jar /app/
# copy your magic startup script and make it executable
COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
# Make this port visible
EXPOSE 8080
# provide a default argument for your script
CMD ["run"]
ENTRYPOINT ["/docker-entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment