From f13e07666e456ef6b966651cc0890e4b73841ea5 Mon Sep 17 00:00:00 2001 From: adamiBs Date: Fri, 13 Sep 2024 20:01:45 +0300 Subject: [PATCH] Use relative path for Dockerfile copies (#412) In order to align with requirements of the official docker library images' build process. https://github.com/docker-library/official-images/pull/17549#issuecomment-2349364178 --- .github/actions/build-and-tag-locally/action.yml | 6 ++---- alpine/Dockerfile | 3 ++- debian/Dockerfile | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/build-and-tag-locally/action.yml b/.github/actions/build-and-tag-locally/action.yml index 149661d7..66015a61 100644 --- a/.github/actions/build-and-tag-locally/action.yml +++ b/.github/actions/build-and-tag-locally/action.yml @@ -84,8 +84,7 @@ runs: - name: Build uses: docker/build-push-action@v6 with: - context: . - file: ${{ inputs.distribution }}/Dockerfile + context: ${{ inputs.distribution }} push: false load: true platforms: ${{ inputs.platform }} @@ -203,8 +202,7 @@ runs: uses: docker/build-push-action@v6 if: ${{ inputs.publish_image == 'true' && contains(fromJSON('["amd64","arm64"]'), steps.platform.outputs.display_name) }} with: - context: . - file: ${{ inputs.distribution }}/Dockerfile + context: ${{ inputs.distribution }} push: true tags: ${{ inputs.registry_repository }}:${{ github.sha }}-${{ inputs.distribution }} cache-from: type=gha diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 74d07c4d..02967ddc 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -132,6 +132,7 @@ RUN set -eux; \ ; \ \ make -C /usr/src/redis distclean; \ + rm -r /usr/src/redis; \ \ runDeps="$( \ scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ @@ -148,7 +149,7 @@ RUN mkdir /data && chown redis:redis /data VOLUME /data WORKDIR /data -COPY alpine/docker-entrypoint.sh /usr/local/bin/ +COPY docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["docker-entrypoint.sh"] EXPOSE 6379 diff --git a/debian/Dockerfile b/debian/Dockerfile index c51a537d..05644b0e 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -139,6 +139,7 @@ RUN set -eux; \ ; \ \ make -C /usr/src/redis distclean; \ + rm -r /usr/src/redis; \ \ apt-mark auto '.*' > /dev/null; \ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ @@ -160,7 +161,7 @@ RUN mkdir /data && chown redis:redis /data VOLUME /data WORKDIR /data -COPY debian/docker-entrypoint.sh /usr/local/bin/ +COPY docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["docker-entrypoint.sh"] EXPOSE 6379