added V2 Ray plugin to shadowsocks docker image
Some checks failed
CI / Build shadowsocks-rust docker images (push) Failing after 42s

This commit is contained in:
2024-08-02 20:19:27 +08:00
parent 6bf1ecafd0
commit 49743706ed
2 changed files with 36 additions and 0 deletions

View File

@@ -40,12 +40,16 @@ RUN case "$TARGETPLATFORM" in \
&& RUSTFLAGS="-C linker=$CC" CC=$CC cargo build --target "$RUST_TARGET" --release --features "full-extra" \
&& mv target/$RUST_TARGET/release/ss* target/release/
COPY download_v2ray.sh download_v2ray.sh
RUN ./download_v2ray.sh
FROM --platform=$TARGETPLATFORM 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/
COPY --from=builder /root/shadowsocks-rust/examples/config.json /etc/shadowsocks-rust/
COPY --from=builder /root/shadowsocks-rust/docker/docker-entrypoint.sh /usr/bin/
COPY --from=builder /tmp/v2ray_plugin /usr/bin/v2ray_plugin
ENTRYPOINT [ "docker-entrypoint.sh" ]
CMD [ "sslocal", "--log-without-time", "-c", "/etc/shadowsocks-rust/config.json" ]
@@ -55,6 +59,7 @@ FROM alpine:3.17 AS ssserver
COPY --from=builder /root/shadowsocks-rust/target/release/ssserver /usr/bin/
COPY --from=builder /root/shadowsocks-rust/examples/config.json /etc/shadowsocks-rust/
COPY --from=builder /root/shadowsocks-rust/docker/docker-entrypoint.sh /usr/bin/
COPY --from=builder /tmp/v2ray_plugin /usr/bin/v2ray_plugin
ENTRYPOINT [ "docker-entrypoint.sh" ]