fix: Docker build upgrade to alpine 3.20

- Removed armv7, arm-linux-gnueabihf, windows-gnu in default build
This commit is contained in:
zonyitoo
2024-05-26 03:07:07 +08:00
parent d586741c8a
commit 22a41d0224
2 changed files with 7 additions and 8 deletions

View File

@@ -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

View File

@@ -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/