From 54872a40b06a97883c84314fb6570214a3766358 Mon Sep 17 00:00:00 2001 From: Conor Heffron Date: Mon, 9 Sep 2024 03:59:57 +0100 Subject: [PATCH] Re-org Dockerfile conf (#55) --- .github/workflows/docker-publish.yml | 1 + Dockerfile | 1 + publish/Dockerfile | 15 +++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 publish/Dockerfile diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index e1b64cb..f867c57 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -76,6 +76,7 @@ jobs: uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 with: context: . + file: publish/Dockerfile push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index fa5523d..8b88d26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ FROM eclipse-temurin:21-jdk VOLUME /tmp +#for aws COPY target/*.war app.war RUN sh -c 'touch /app.war' diff --git a/publish/Dockerfile b/publish/Dockerfile new file mode 100644 index 0000000..b626848 --- /dev/null +++ b/publish/Dockerfile @@ -0,0 +1,15 @@ +FROM eclipse-temurin:21-jdk + +VOLUME /tmp + +#for docker pub +COPY *.war app.war +RUN sh -c 'touch /app.war' + +ENV RUN_FILE /run.sh +COPY run.sh ${RUN_FILE} +RUN chmod +x ${RUN_FILE} + +EXPOSE 8080 + +ENTRYPOINT [ "sh", "-c", "${RUN_FILE}" ]