From 1c3e8692cba5d18facab320b8a94ccd047bdcdf8 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Sat, 27 Jul 2024 03:17:25 +0530 Subject: [PATCH] Add Docker --- .github/workflows/docker.yml | 20 ++++++++++++++++++++ docker/Dockerfile | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/docker.yml create mode 100644 docker/Dockerfile diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 00000000..7d34832a --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,20 @@ +name: Docker Build + +on: + push: + workflow_dispatch: + inputs: + name: + description: 'GitHub Actions' + required: true + default: 'GitHub Actions' + +jobs: + JDK17: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Build Image + run: docker build -f docker/Dockerfile -t expressgateway:build . diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 00000000..02048cfb --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,8 @@ +FROM maven:3.9.8-amazoncorretto-21-al2023 + +WORKDIR /usr/app +COPY . . + +RUN mvn -ntp -B clean package -DskipTests + +ENTRYPOINT ["java", "-XX:+UseShenandoahGC", "-jar", "/usr/app/bootstrap/bootstrap-0.0.1-a.jar"]