Skip to content

Commit

Permalink
feat: use arm image for arm package
Browse files Browse the repository at this point in the history
  • Loading branch information
taloric committed Jan 6, 2025
1 parent 43b4882 commit 97909c1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/agent-build-rust-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
push:
branches:
- package-rust-env
- package-rust-env-prepare
paths:
- 'agent/docker/DockerfileToFix.build'
- 'agent/docker/DockerfileToFix-aarch64.build'
Expand Down
3 changes: 3 additions & 0 deletions agent/docker/dockerfile-build-env
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.12.0/p
RUN unzip protoc-3.12.0.zip -d protoc-3.12.0
RUN mv protoc-3.12.0/bin/* /usr/bin/ && cp -rf protoc-3.12.0/include/* /usr/include/
RUN yum clean all

RUN rustup target add x86_64-unknown-linux-musl
RUN cargo install sccache
9 changes: 8 additions & 1 deletion agent/docker/dockerfile-build-env-aarch64
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
FROM ghcr.io/deepflowio/rust-build:1.30
FROM ghcr.io/deepflowio/rust-build:1.30-arm64

RUN rustup self uninstall -y
RUN curl https://sh.rustup.rs -so rustup.sh; bash rustup.sh -y
RUN sed -i -e 's/mirror.centos.org/vault.centos.org/g' \
-e 's/^#.*baseurl=http/baseurl=http/g' \
-e 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo

RUN sed -i -e 's/vault.centos.org\/centos/vault.centos.org\/altarch/g' \
-e 's/^#.*baseurl=http/baseurl=http/g' \
-e 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo

RUN yum install -y perl-IPC-Cmd perl-core which gcc-c++ wget unzip

WORKDIR /root
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.12.0/protoc-3.12.0-linux-aarch_64.zip -O protoc-3.12.0.zip && unzip protoc-3.12.0.zip
RUN unzip protoc-3.12.0.zip -d protoc-3.12.0
RUN mv protoc-3.12.0/bin/* /usr/bin/ && cp -rf protoc-3.12.0/include/* /usr/include/
RUN yum clean all

RUN rustup target add aarch64-unknown-linux-musl
RUN cargo install sccache

0 comments on commit 97909c1

Please sign in to comment.