diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 94bfdcc..c8a1665 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -101,7 +101,7 @@ jobs: - name: Build and push uses: docker/build-push-action@v3 with: - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/arm/v7 push: ${{ startsWith(github.ref, 'refs/tags/') }} cache-from: type=gha cache-to: type=gha,mode=max diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a0303a..fbdb1f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Build Docker image for ARMv7. + ### Changed - Use rust:1.61 as base image for docker image. diff --git a/Dockerfile b/Dockerfile index a186104..e42579a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,13 +14,19 @@ RUN echo "Setting variables for ${TARGETPLATFORM:=linux/amd64}" && \ linux/arm64) \ echo "aarch64-unknown-linux-gnu" | tee /tmp/rusttarget; \ break;; \ + linux/arm/v7) \ + echo "armv7-unknown-linux-gnueabihf" | tee /tmp/rusttarget; \ + break;; \ *) echo "unsupported platform ${TARGETPLATFORM}";; \ esac RUN rustup target add "$(cat /tmp/rusttarget)" -RUN dpkg --add-architecture arm64 && apt-get update && \ +RUN dpkg --add-architecture arm64 &&\ + dpkg --add-architecture armhf && \ + apt-get update && \ apt-get install -y pkg-config libssl-dev cmake g++ \ - libssl-dev:arm64 gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + libssl-dev:arm64 gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \ + libssl-dev:armhf gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf COPY .cargo ./.cargo COPY ./scripts/mangen.rs ./scripts/mangen.rs