Skip to content

Commit

Permalink
update build_gnu_docker.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
heqingpan committed Apr 1, 2024
1 parent f623e76 commit 288de0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 4 additions & 3 deletions docker/build_gnu_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

echo "start build_gnu_docker"
echo $TARGETARCH
echo $CARGO_BUILD_TARGET
echo $TARGETPLATFORM
echo $BUILDPLATFORM

if ["$TARGETARCH" = "arm64" ];
then
rustup target add aarch64-unknown-linux-gnu
cargo build --release aarch64-unknown-linux-gnu
cargo build --release --target aarch64-unknown-linux-gnu
mv target/aarch64-unknown-linux-gnu/release/rnacos /usr/bin/rnacos
else
rustup target add x86_64-unknown-linux-gnu
cargo build --release x86_64-unknown-linux-gnu
cargo build --release --target x86_64-unknown-linux-gnu
mv target/x86_64-unknown-linux-gnu/release/rnacos /usr/bin/rnacos
fi

Expand Down
5 changes: 2 additions & 3 deletions docker/pre_dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
ARG TARGETARCH
FROM --platform=$BUILDPLATFORM rust:latest as builder
ARG TARGETARCH

RUN echo $TARGETARCH && \
echo $CARGO_BUILD_TARGET
ARG TARGETPLATFORM
ARG BUILDPLATFORM

WORKDIR /usr/src/rnacos
COPY . .
Expand Down

0 comments on commit 288de0d

Please sign in to comment.