Skip to content

Commit

Permalink
Feat: add busybox based image build (#154)
Browse files Browse the repository at this point in the history
Co-authored-by: mael le saout <[email protected]>
  • Loading branch information
mlesaout and mlesaout-orange authored Feb 16, 2023
1 parent 8f89a39 commit e4fbc41
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,20 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}
- name: Docker meta busybox
id: meta-busybox
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}
flavor: |
suffix=-busybox
- name: Login to GHCR
uses: docker/login-action@v2
with:
Expand All @@ -110,3 +124,15 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build and push busybox based image
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-busybox.outputs.tags }}
labels: ${{ steps.meta-busybox.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BASE_IMAGE=busybox:1.36-uclibc
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2022 The OWASP Coraza contributors
# SPDX-License-Identifier: Apache-2.0

FROM scratch
ARG BASE_IMAGE
FROM ${BASE_IMAGE:-scratch}

COPY build/main.wasm /plugin.wasm

0 comments on commit e4fbc41

Please sign in to comment.