From 29e353eb9d446fbe5eb727e08de711ec2a8b1ae7 Mon Sep 17 00:00:00 2001 From: Muhammad Faizan Date: Mon, 16 Sep 2024 10:41:17 +0200 Subject: [PATCH] fix: changed Dockerfile working directory (#218) * changed Dockerfile working directory * removed test job in build image * retrigger --- .github/workflows/pull-build-image.yaml | 17 ----------------- Dockerfile | 4 ++-- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pull-build-image.yaml b/.github/workflows/pull-build-image.yaml index a3bc58d..37f0aeb 100644 --- a/.github/workflows/pull-build-image.yaml +++ b/.github/workflows/pull-build-image.yaml @@ -16,20 +16,3 @@ jobs: dockerfile: Dockerfile context: . export-tags: true - test-image: - runs-on: ubuntu-latest - needs: build - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install jq - run: sudo apt-get install jq - - - name: Extract image name from JSON - id: extract-image - run: | - echo "IMAGE_NAME=$(echo '${{ needs.build.outputs.images }}' | jq -r '.[0]')" >> $GITHUB_ENV - - - name: Test image - run: ./scripts/shell/run-and-check-container.sh "$IMAGE_NAME" PR-${{ github.event.number }}-container diff --git a/Dockerfile b/Dockerfile index a1ae9b6..0d88231 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM europe-docker.pkg.dev/kyma-project/prod/external/library/golang:1.23.0-alpi ARG TARGETOS ARG TARGETARCH -WORKDIR /workspace +WORKDIR /app # Copy the Go Modules manifests COPY go.mod go.mod COPY go.sum go.sum @@ -27,7 +27,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o ma # Refer to https://github.com/GoogleContainerTools/distroless for more details FROM gcr.io/distroless/static:nonroot WORKDIR / -COPY --from=builder /workspace/manager . +COPY --from=builder /app/manager . USER 65532:65532 ENTRYPOINT ["/manager"]