From b1ab7dc415ecd3211f5f0370ed37bb2f5018ccd3 Mon Sep 17 00:00:00 2001 From: Joel Pearson Date: Wed, 1 Dec 2021 17:41:51 +1100 Subject: [PATCH] Try setting chmod --- .github/workflows/ci.yml | 3 ++- ci.Dockerfile | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97a5dd3..6155103 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,11 +63,12 @@ jobs: env: VERSION: ${{ steps.get_version.outputs.VERSION }} BUILT_BINARY: manager-${{ steps.get_version.outputs.VERSION }}-linux-amd64 + DOCKER_BUILDKIT: 1 with: name: pearj/adcs-issuer registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - buildargs: VERSION,BUILD_BINARY + buildargs: BUILT_BINARY dockerfile: ci.Dockerfile tags: "latest,${{ env.VERSION }}" diff --git a/ci.Dockerfile b/ci.Dockerfile index cd4e04e..419975c 100644 --- a/ci.Dockerfile +++ b/ci.Dockerfile @@ -1,9 +1,11 @@ +# syntax=docker/dockerfile:1.3 + # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details FROM gcr.io/distroless/static:nonroot WORKDIR / ARG BUILT_BINARY -COPY ${BUILT_BINARY} /manager +COPY --chmod=555 ${BUILT_BINARY} /manager USER nonroot:nonroot ENTRYPOINT ["/manager"]