Skip to content

Instantly share code, notes, and snippets.

@bfrancom
Last active March 7, 2023 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bfrancom/d2ca0f7c767092a924c99545298b557d to your computer and use it in GitHub Desktop.
Save bfrancom/d2ca0f7c767092a924c99545298b557d to your computer and use it in GitHub Desktop.
Dockerfile for building java app in GitHub actions and deploying to AWS ECS/Fargate
#See https://gist.github.com/bfrancom/6ebebbf899912cd3c76c7f2978be0961 for deploying this docker container on ECS Fargate
FROM openjdk:8-jdk-slim as builder
#WORKDIR build
EXPOSE 8080
RUN mkdir target
ARG JAR_FILE=./target/*.jar
COPY ${JAR_FILE} target/app.jar
#You probably don't want to do this in production, and should tune memory, gc, etc.
ENTRYPOINT ["java","-jar","/target/app.jar"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment