From 22a41d022479084c81bb914bba86ee9c57311703 Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Sun, 26 May 2024 03:07:07 +0800 Subject: [PATCH] fix: Docker build upgrade to alpine 3.20 - Removed armv7, arm-linux-gnueabihf, windows-gnu in default build --- .github/workflows/build-release.yml | 8 ++++---- Dockerfile | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 17b97643c0ec..f9f5955ba8ce 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -23,13 +23,13 @@ jobs: matrix: target: - i686-unknown-linux-musl - - x86_64-pc-windows-gnu + # - x86_64-pc-windows-gnu - x86_64-unknown-linux-gnu - x86_64-unknown-linux-musl - - armv7-unknown-linux-musleabihf - - armv7-unknown-linux-gnueabihf + # - armv7-unknown-linux-musleabihf + # - armv7-unknown-linux-gnueabihf - arm-unknown-linux-gnueabi - - arm-unknown-linux-gnueabihf + # - arm-unknown-linux-gnueabihf - arm-unknown-linux-musleabi - arm-unknown-linux-musleabihf - aarch64-unknown-linux-gnu diff --git a/Dockerfile b/Dockerfile index 61b351329106..06df73794e14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM --platform=$BUILDPLATFORM rust:1.67.1-alpine3.17 AS builder +FROM --platform=$BUILDPLATFORM rust:alpine3.20 AS builder ARG TARGETARCH RUN set -x \ - && apk add --no-cache build-base cmake + && apk add --no-cache build-base cmake llvm15-dev clang15-libclang clang15 rust-bindgen WORKDIR /root/shadowsocks-rust @@ -33,11 +33,10 @@ RUN case "$TARGETARCH" in \ && echo "CC=$CC" \ && rustup override set stable \ && rustup target add "$RUST_TARGET" \ - && cargo install --force --locked bindgen-cli \ && RUSTFLAGS="-C linker=$CC" CC=$CC cargo build --target "$RUST_TARGET" --release --features "full" \ && mv target/$RUST_TARGET/release/ss* target/release/ -FROM alpine:3.17 AS sslocal +FROM alpine:3.20 AS sslocal # NOTE: Please be careful to change the path of these binaries, refer to #1149 for more information. COPY --from=builder /root/shadowsocks-rust/target/release/sslocal /usr/bin/