Skip to content

Commit

Permalink
refs #8 Dockerfileを作成
Browse files Browse the repository at this point in the history
  • Loading branch information
averak committed Jan 8, 2024
1 parent 7d92729 commit 799e22d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- name: build docker image
uses: docker/build-push-action@v3
with:
context: .
push: false
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 799e22d

Please sign in to comment.