diff --git a/.github/workflows/image-build.yml b/.github/workflows/image-build.yml index 9fa5fe40c..0f2cdd04c 100644 --- a/.github/workflows/image-build.yml +++ b/.github/workflows/image-build.yml @@ -37,6 +37,24 @@ jobs: tags: ghcr.io/${{ github.repository }}:latest-arm64 file: deployments/Dockerfile.arm64 + build-arm32: + name: Image build/arm32 + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Build container image + uses: docker/build-push-action@v2 + with: + context: . + push: false + tags: ghcr.io/${{ github.repository }}:latest-arm32 + file: deployments/Dockerfile.arm32 + build-ppc64le: name: Image build/ppc64le runs-on: ubuntu-latest diff --git a/.github/workflows/image-push-master.yml b/.github/workflows/image-push-master.yml index a091cb9ee..6f9dd56fa 100644 --- a/.github/workflows/image-push-master.yml +++ b/.github/workflows/image-push-master.yml @@ -62,6 +62,35 @@ jobs: ghcr.io/${{ github.repository }}:snapshot-arm64 file: deployments/Dockerfile.arm64 + push-arm32: + name: Image push/arm32 + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to GitHub Container Registry + if: github.repository_owner == 'k8snetworkplumbingwg' + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push container image + if: github.repository_owner == 'k8snetworkplumbingwg' + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: | + ghcr.io/${{ github.repository }}:latest-arm32 + ghcr.io/${{ github.repository }}:snapshot-arm32 + file: deployments/Dockerfile.arm32 + push-ppc64le: name: Image push/ppc64le runs-on: ubuntu-latest @@ -172,21 +201,25 @@ jobs: # get artifacts from previous steps docker pull ${{ env.REPOSITORY }}:snapshot-amd64 docker pull ${{ env.REPOSITORY }}:snapshot-arm64 + docker pull ${{ env.REPOSITORY }}:snapshot-arm32 docker pull ${{ env.REPOSITORY }}:snapshot-ppc64le docker pull ${{ env.REPOSITORY }}:snapshot-s390x docker pull ${{ env.REPOSITORY }}:latest-amd64 docker pull ${{ env.REPOSITORY }}:latest-arm64 + docker pull ${{ env.REPOSITORY }}:latest-arm32 docker pull ${{ env.REPOSITORY }}:latest-ppc64le docker pull ${{ env.REPOSITORY }}:latest-s390x - docker manifest create ${{ env.REPOSITORY }}:snapshot ${{ env.REPOSITORY }}:snapshot-amd64 ${{ env.REPOSITORY }}:snapshot-arm64 ${{ env.REPOSITORY }}:snapshot-ppc64le ${{ env.REPOSITORY }}:snapshot-s390x + docker manifest create ${{ env.REPOSITORY }}:snapshot ${{ env.REPOSITORY }}:snapshot-amd64 ${{ env.REPOSITORY }}:snapshot-arm64 ${{ env.REPOSITORY }}:snapshot-arm32 ${{ env.REPOSITORY }}:snapshot-ppc64le ${{ env.REPOSITORY }}:snapshot-s390x docker manifest annotate ${{ env.REPOSITORY }}:snapshot ${{ env.REPOSITORY }}:snapshot-amd64 --arch amd64 docker manifest annotate ${{ env.REPOSITORY }}:snapshot ${{ env.REPOSITORY }}:snapshot-arm64 --arch arm64 + docker manifest annotate ${{ env.REPOSITORY }}:snapshot ${{ env.REPOSITORY }}:snapshot-arm32 --arch arm docker manifest annotate ${{ env.REPOSITORY }}:snapshot ${{ env.REPOSITORY }}:snapshot-ppc64le --arch ppc64le docker manifest annotate ${{ env.REPOSITORY }}:snapshot ${{ env.REPOSITORY }}:snapshot-s390x --arch s390x docker manifest push ${{ env.REPOSITORY }}:snapshot - docker manifest create ${{ env.REPOSITORY }}:latest ${{ env.REPOSITORY }}:latest-amd64 ${{ env.REPOSITORY }}:latest-arm64 ${{ env.REPOSITORY }}:latest-ppc64le ${{ env.REPOSITORY }}:latest-s390x + docker manifest create ${{ env.REPOSITORY }}:latest ${{ env.REPOSITORY }}:latest-amd64 ${{ env.REPOSITORY }}:latest-arm64 ${{ env.REPOSITORY }}:latest-arm32 ${{ env.REPOSITORY }}:latest-ppc64le ${{ env.REPOSITORY }}:latest-s390x docker manifest annotate ${{ env.REPOSITORY }}:latest ${{ env.REPOSITORY }}:latest-amd64 --arch amd64 docker manifest annotate ${{ env.REPOSITORY }}:latest ${{ env.REPOSITORY }}:latest-arm64 --arch arm64 + docker manifest annotate ${{ env.REPOSITORY }}:latest ${{ env.REPOSITORY }}:latest-arm32 --arch arm docker manifest annotate ${{ env.REPOSITORY }}:latest ${{ env.REPOSITORY }}:latest-ppc64le --arch ppc64le docker manifest annotate ${{ env.REPOSITORY }}:latest ${{ env.REPOSITORY }}:latest-s390x --arch s390x docker manifest push ${{ env.REPOSITORY }}:latest diff --git a/.github/workflows/image-push-release.yml b/.github/workflows/image-push-release.yml index 162c39ff1..281b7f908 100644 --- a/.github/workflows/image-push-release.yml +++ b/.github/workflows/image-push-release.yml @@ -76,6 +76,42 @@ jobs: ${{ steps.docker_meta.outputs.tags }}-arm64 file: deployments/Dockerfile.arm64 + push-arm32: + name: Image push/arm32 + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to GitHub Container Registry + if: github.repository_owner == 'k8snetworkplumbingwg' + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker meta + id: docker_meta + uses: crazy-max/ghaction-docker-meta@v1 + with: + images: ghcr.io/${{ github.repository }} + tag-latest: false + + - name: Push container image + if: github.repository_owner == 'k8snetworkplumbingwg' + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: | + ghcr.io/${{ github.repository }}:stable-arm32 + ${{ steps.docker_meta.outputs.tags }}-arm32 + file: deployments/Dockerfile.arm32 + push-ppc64le: name: Image push/ppc64le runs-on: ubuntu-latest @@ -214,21 +250,25 @@ jobs: # get artifacts from previous steps docker pull ${{ steps.docker_meta.outputs.tags }}-amd64 docker pull ${{ steps.docker_meta.outputs.tags }}-arm64 + docker pull ${{ steps.docker_meta.outputs.tags }}-arm32 docker pull ${{ steps.docker_meta.outputs.tags }}-ppc64le docker pull ${{ steps.docker_meta.outputs.tags }}-s390x - docker manifest create ${{ steps.docker_meta.outputs.tags }} ${{ steps.docker_meta.outputs.tags }}-amd64 ${{ steps.docker_meta.outputs.tags }}-arm64 ${{ steps.docker_meta.outputs.tags }}-ppc64le ${{ steps.docker_meta.outputs.tags }}-s390x + docker manifest create ${{ steps.docker_meta.outputs.tags }} ${{ steps.docker_meta.outputs.tags }}-amd64 ${{ steps.docker_meta.outputs.tags }}-arm64 ${{ steps.docker_meta.outputs.tags }}-arm32 ${{ steps.docker_meta.outputs.tags }}-ppc64le ${{ steps.docker_meta.outputs.tags }}-s390x docker manifest annotate ${{ steps.docker_meta.outputs.tags }} ${{ steps.docker_meta.outputs.tags }}-amd64 --arch amd64 docker manifest annotate ${{ steps.docker_meta.outputs.tags }} ${{ steps.docker_meta.outputs.tags }}-arm64 --arch arm64 + docker manifest annotate ${{ steps.docker_meta.outputs.tags }} ${{ steps.docker_meta.outputs.tags }}-arm32 --arch arm32 docker manifest annotate ${{ steps.docker_meta.outputs.tags }} ${{ steps.docker_meta.outputs.tags }}-ppc64le --arch ppc64le docker manifest annotate ${{ steps.docker_meta.outputs.tags }} ${{ steps.docker_meta.outputs.tags }}-s390x --arch s390x docker manifest push ${{ steps.docker_meta.outputs.tags }} docker pull ${{ env.REPOSITORY }}:stable-amd64 docker pull ${{ env.REPOSITORY }}:stable-arm64 + docker pull ${{ env.REPOSITORY }}:stable-arm32 docker pull ${{ env.REPOSITORY }}:stable-ppc64le docker pull ${{ env.REPOSITORY }}:stable-s390x - docker manifest create ${{ env.REPOSITORY }}:stable ${{ env.REPOSITORY }}:stable-amd64 ${{ env.REPOSITORY }}:stable-arm64 ${{ env.REPOSITORY }}:stable-ppc64le ${{ env.REPOSITORY }}:stable-s390x + docker manifest create ${{ env.REPOSITORY }}:stable ${{ env.REPOSITORY }}:stable-amd64 ${{ env.REPOSITORY }}:stable-arm64 ${{ env.REPOSITORY }}:stable-arm32 ${{ env.REPOSITORY }}:stable-ppc64le ${{ env.REPOSITORY }}:stable-s390x docker manifest annotate ${{ env.REPOSITORY }}:stable ${{ env.REPOSITORY }}:stable-amd64 --arch amd64 docker manifest annotate ${{ env.REPOSITORY }}:stable ${{ env.REPOSITORY }}:stable-arm64 --arch arm64 + docker manifest annotate ${{ env.REPOSITORY }}:stable ${{ env.REPOSITORY }}:stable-arm32 --arch arm docker manifest annotate ${{ env.REPOSITORY }}:stable ${{ env.REPOSITORY }}:stable-ppc64le --arch ppc64le docker manifest annotate ${{ env.REPOSITORY }}:stable ${{ env.REPOSITORY }}:stable-s390x --arch s390x docker manifest push ${{ env.REPOSITORY }}:stable diff --git a/deployments/Dockerfile.arm32 b/deployments/Dockerfile.arm32 new file mode 100644 index 000000000..19d153b74 --- /dev/null +++ b/deployments/Dockerfile.arm32 @@ -0,0 +1,21 @@ +# This Dockerfile is used to build the image available on DockerHub +FROM golang:1.13.4 as build + +# Add everything +ADD . /usr/src/multus-cni + +ENV GOARCH "arm" +ENV GOOS "linux" + +RUN cd /usr/src/multus-cni && \ + ./hack/build-go.sh + +# build arm container +FROM arm32v7/centos:7 +LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni +COPY --from=build /usr/src/multus-cni /usr/src/multus-cni + +WORKDIR / +ADD ./images/entrypoint.sh / + +ENTRYPOINT ["/entrypoint.sh"]