From 45c1075ae01c77a18326fbcd2030eeded36278ad Mon Sep 17 00:00:00 2001 From: he2ss Date: Mon, 28 Feb 2022 12:04:31 +0100 Subject: [PATCH] docker image: add multi arch platforms (#1270) * docker image: add multi arch platforms --- .github/workflows/release_publish_docker-image-debian.yml | 3 ++- .github/workflows/release_publish_docker-image.yml | 2 +- Dockerfile | 1 + Dockerfile.debian | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_publish_docker-image-debian.yml b/.github/workflows/release_publish_docker-image-debian.yml index 985890b8f..cc8e0e3b4 100644 --- a/.github/workflows/release_publish_docker-image-debian.yml +++ b/.github/workflows/release_publish_docker-image-debian.yml @@ -4,6 +4,7 @@ on: types: - released - prereleased + workflow_dispatch: jobs: push_to_registry: name: Push Docker debian image to Docker Hub @@ -52,7 +53,7 @@ jobs: file: ./Dockerfile.debian push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prep.outputs.tags }} - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/386 labels: | org.opencontainers.image.source=${{ github.event.repository.html_url }} org.opencontainers.image.created=${{ steps.prep.outputs.created }} diff --git a/.github/workflows/release_publish_docker-image.yml b/.github/workflows/release_publish_docker-image.yml index 7ff968efc..093fe4726 100644 --- a/.github/workflows/release_publish_docker-image.yml +++ b/.github/workflows/release_publish_docker-image.yml @@ -52,7 +52,7 @@ jobs: file: ./Dockerfile push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prep.outputs.tags }} - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/386 labels: | org.opencontainers.image.source=${{ github.event.repository.html_url }} org.opencontainers.image.created=${{ steps.prep.outputs.created }} diff --git a/Dockerfile b/Dockerfile index 8ff3f4b55..47380404d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,7 @@ COPY --from=build /go/src/crowdsec/docker/docker_start.sh / COPY --from=build /go/src/crowdsec/docker/config.yaml /staging/etc/crowdsec/config.yaml #Due to the wizard using cp -n, we have to copy the config files directly from the source as -n does not exist in busybox cp #The files are here for reference, as users will need to mount a new version to be actually able to use notifications +COPY --from=build /go/src/crowdsec/plugins/notifications/email/email.yaml /staging/etc/crowdsec/notifications/email.yaml COPY --from=build /go/src/crowdsec/plugins/notifications/http/http.yaml /staging/etc/crowdsec/notifications/http.yaml COPY --from=build /go/src/crowdsec/plugins/notifications/slack/slack.yaml /staging/etc/crowdsec/notifications/slack.yaml COPY --from=build /go/src/crowdsec/plugins/notifications/splunk/splunk.yaml /staging/etc/crowdsec/notifications/splunk.yaml diff --git a/Dockerfile.debian b/Dockerfile.debian index bd797947a..421f99d39 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -37,6 +37,7 @@ COPY --from=build /go/src/crowdsec/docker/config.yaml /staging/etc/crowdsec/conf RUN yq eval -i ".plugin_config.group = \"nogroup\"" /staging/etc/crowdsec/config.yaml #Due to the wizard using cp -n, we have to copy the config files directly from the source as -n does not exist in busybox cp #The files are here for reference, as users will need to mount a new version to be actually able to use notifications +COPY --from=build /go/src/crowdsec/plugins/notifications/email/email.yaml /staging/etc/crowdsec/notifications/email.yaml COPY --from=build /go/src/crowdsec/plugins/notifications/http/http.yaml /staging/etc/crowdsec/notifications/http.yaml COPY --from=build /go/src/crowdsec/plugins/notifications/slack/slack.yaml /staging/etc/crowdsec/notifications/slack.yaml COPY --from=build /go/src/crowdsec/plugins/notifications/splunk/splunk.yaml /staging/etc/crowdsec/notifications/splunk.yaml