mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-11-06 08:14:07 +00:00
Update docker base image
- Update base image to alpine 3.17
This commit is contained in:
+3
-3
@@ -1,4 +1,4 @@
|
||||
FROM --platform=$BUILDPLATFORM rust:1.61.0-alpine AS builder
|
||||
FROM --platform=$BUILDPLATFORM rust:1.67.1-alpine3.17 AS builder
|
||||
|
||||
ARG TARGETARCH
|
||||
|
||||
@@ -36,7 +36,7 @@ RUN case "$TARGETARCH" in \
|
||||
&& RUSTFLAGS="-C linker=$CC" CC=$CC cargo build --target "$RUST_TARGET" --release --features "local-tun local-redir stream-cipher aead-cipher-2022" \
|
||||
&& mv target/$RUST_TARGET/release/ss* target/release/
|
||||
|
||||
FROM alpine:3.16 AS sslocal
|
||||
FROM alpine:3.17 AS sslocal
|
||||
|
||||
COPY --from=builder /root/shadowsocks-rust/target/release/sslocal /usr/local/bin/
|
||||
COPY --from=builder /root/shadowsocks-rust/examples/config.json /etc/shadowsocks-rust/
|
||||
@@ -45,7 +45,7 @@ COPY --from=builder /root/shadowsocks-rust/docker/docker-entrypoint.sh /usr/loca
|
||||
ENTRYPOINT [ "docker-entrypoint.sh" ]
|
||||
CMD [ "sslocal", "--log-without-time", "-c", "/etc/shadowsocks-rust/config.json" ]
|
||||
|
||||
FROM alpine:3.16 AS ssserver
|
||||
FROM alpine:3.17 AS ssserver
|
||||
|
||||
COPY --from=builder /root/shadowsocks-rust/target/release/ssserver /usr/local/bin/
|
||||
COPY --from=builder /root/shadowsocks-rust/examples/config.json /etc/shadowsocks-rust/
|
||||
|
||||
@@ -115,8 +115,8 @@ docker pull ghcr.io/shadowsocks/ssserver-rust:latest
|
||||
If you want to build the Docker image yourself, you need to use the [BuildX](https://docs.docker.com/buildx/working-with-buildx/).
|
||||
|
||||
```bash
|
||||
docker buildx build -t shadowsocks/ssserver-rust:latest -t shadowsocks/ssserver-rust:v1.11.1 --target ssserver .
|
||||
docker buildx build -t shadowsocks/sslocal-rust:latest -t shadowsocks/sslocal-rust:v1.11.1 --target sslocal .
|
||||
docker buildx build -t shadowsocks/ssserver-rust:latest -t shadowsocks/ssserver-rust:v1.15.2 --target ssserver .
|
||||
docker buildx build -t shadowsocks/sslocal-rust:latest -t shadowsocks/sslocal-rust:v1.15.2 --target sslocal .
|
||||
```
|
||||
|
||||
#### Run the container
|
||||
|
||||
Reference in New Issue
Block a user