Skip to content

Commit 776e09b

Browse files
authored
build: revert to dynamic (#172)
* build: revert to dynamic * build: use oldest available debian build image
1 parent 9222af7 commit 776e09b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

build/rust.Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
ARG RUST_VERSION=1.71.1
2-
FROM rust:${RUST_VERSION}
2+
FROM rust:${RUST_VERSION}-buster
33

44
RUN apt update && apt upgrade -y
55

66
ARG ARCH_NAME
77
RUN if [ "${ARCH_NAME}" = "aarch64" ]; then \
88
# We assume the docker image's arch is x86_64, so cross-compiling for aarch64
9-
apt install -y g++-aarch64-linux-gnu libc6-dev-arm64-cross \
10-
libssl-dev pkg-config && \
9+
apt install -y g++-aarch64-linux-gnu libc6-dev-arm64-cross pkg-config && \
1110
rustup toolchain install stable-aarch64-unknown-linux-gnu --force-non-host; \
1211
fi
12+
RUN apt install -y libssl-dev
1313
RUN rustup target add "${ARCH_NAME}-unknown-linux-gnu"
1414

1515
WORKDIR /usr/src/app
@@ -18,7 +18,7 @@ ENV CARGO_HOME=/usr/src/app/.cargo
1818

1919
ENV ARCH_NAME=${ARCH_NAME} \
2020
# Generate static builds
21-
RUSTFLAGS="-C target-feature=+crt-static" \
21+
# RUSTFLAGS="-C target-feature=+crt-static" \
2222
# Use the correct linker for aarch64 target
2323
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
2424
CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \

build/scripts/replace_go_with_rust.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fi
2222

2323
docker build -t "rust-cross-${ARCH_NAME}" -f ./build/rust.Dockerfile --build-arg ARCH_NAME="${ARCH_NAME}" .
2424

25-
if [ "x${CI}" = "xtrue" ]; then
25+
if [ "${CI}" = "true" ]; then
2626
CARGO_HOME=/tmp/.cargo cargo fetch
2727
docker run --rm --user "$(id -u)":"$(id -g)" -v "$PWD":/usr/src/app -v /tmp/.cargo:/usr/src/app/.cargo rust-cross-"${ARCH_NAME}"
2828
else

0 commit comments

Comments
 (0)