Skip to content

Commit

Permalink
Add Docker image build for ARMv7 (#84)
Browse files Browse the repository at this point in the history
* add changes

* add docker image build for armv7

* add changes to changelog

* fix arch

* fix dpkg command
  • Loading branch information
ultram4rine authored May 30, 2022
1 parent c8709b3 commit 12f5134
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 12f5134

Please sign in to comment.