diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df4459f..4bb22df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,12 +67,9 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: corretto - java-version: 17 - cache: gradle - - name: backend build - run: | - ./gradlew quarkusBuild \ No newline at end of file + - name: build docker image + uses: docker/build-push-action@v3 + with: + context: . + push: false diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..179216d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM public.ecr.aws/docker/library/amazoncorretto:17 as build-stage + +WORKDIR /app +COPY . /app/ + +RUN yum install -y git +RUN ./gradlew build -x test + +FROM public.ecr.aws/docker/library/amazoncorretto:17 + +COPY --from=build-stage /app/build/libs/*.jar app.jar +ENTRYPOINT ["java","-jar","app.jar"]