From 94c4c8a6bd08ba1e8105243741f9857dd64ffd85 Mon Sep 17 00:00:00 2001 From: Joonas Bergius Date: Mon, 23 Sep 2024 14:36:22 -0500 Subject: [PATCH] feat: Add wolfi-based image Signed-off-by: Joonas Bergius --- .github/workflows/build.yml | 20 ++++++++++++++++++++ Dockerfile.wolfi | 7 +++++++ 2 files changed, 27 insertions(+) create mode 100644 Dockerfile.wolfi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e04518f..b395c35 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,6 +86,15 @@ jobs: type=sha,prefix= type=semver,pattern={{version}} + - name: Extract metadata (tags, labels) for Docker + id: meta_wolfi + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=sha,prefix=,suffix=-wolfi + type=semver,pattern={{version}},suffix=-wolfi + - name: Load artifacts uses: actions/download-artifact@v4 with: @@ -106,3 +115,14 @@ jobs: labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64 build-args: "BIN_PATH=artifacts/wasmcloud-operator" + + - name: Build and push Docker image (wolfi) + uses: docker/build-push-action@v6 + with: + push: true + context: . + file: './Dockerfile.wolfi' + tags: ${{ steps.meta_wolfi.outputs.tags }} + labels: ${{ steps.meta_wolfi.outputs.labels }} + platforms: linux/amd64,linux/arm64 + build-args: "BIN_PATH=artifacts/wasmcloud-operator" diff --git a/Dockerfile.wolfi b/Dockerfile.wolfi new file mode 100644 index 0000000..bc30868 --- /dev/null +++ b/Dockerfile.wolfi @@ -0,0 +1,7 @@ +# syntax=docker/dockerfile:1 +FROM chainguard/wolfi-base:latest +ARG BIN_PATH +ARG TARGETARCH + +COPY ${BIN_PATH}-${TARGETARCH} /usr/local/bin/wasmcloud-operator +ENTRYPOINT ["/usr/local/bin/wasmcloud-operator"]