From ecac14284bd33160cb019d30af19130afc3994d0 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 14 May 2024 21:32:12 +0200 Subject: [PATCH] ci: build and push Docker image based on Chainguard base image (#2036) --- .github/workflows/release.yml | 7 +++++++ Dockerfile.wolfi | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 Dockerfile.wolfi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 841057ac2..854ee4231 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,6 +112,10 @@ jobs: attestations: write id-token: write contents: write + strategy: + fail-fast: false + matrix: + dockerfile: [ 'Dockerfile', 'Dockerfile.wolfi' ] env: DOCKER_IMAGE_NAME: docker.elastic.co/observability/apm-agent-python steps: @@ -137,6 +141,8 @@ jobs: tags: | type=raw,value=latest,prefix=test-,enable={{is_default_branch}} type=semver,pattern={{version}} + flavor: | + suffix=${{ contains(matrix.dockerfile, 'wolfi') && '-wolfi' || '' }} - name: Build and push image id: push @@ -144,6 +150,7 @@ jobs: with: context: . push: true + file: ${{ matrix.dockerfile }} tags: ${{ steps.docker-meta.outputs.tags }} labels: ${{ steps.docker-meta.outputs.labels }} build-args: | diff --git a/Dockerfile.wolfi b/Dockerfile.wolfi new file mode 100644 index 000000000..1ed923ce5 --- /dev/null +++ b/Dockerfile.wolfi @@ -0,0 +1,3 @@ +FROM docker.elastic.co/wolfi/chainguard-base@sha256:9f940409f96296ef56140bcc4665c204dd499af4c32c96cc00e792558097c3f1 +ARG AGENT_DIR +COPY ${AGENT_DIR} /opt/python \ No newline at end of file