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}" ]