Dockerfile for building java app in GitHub actions and deploying to AWS ECS/Fargate
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
#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