This repository has been archived on 2024-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
shadowsocks-libev-v2ray/Dockerfile

31 lines
1.2 KiB
Docker
Raw Permalink Normal View History

2022-12-15 03:14:16 +03:00
FROM alpine:3.17.0
2022-12-27 13:37:43 +03:00
RUN apk add --no-cache curl libqrencode
RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing shadowsocks-libev
2022-12-15 03:14:16 +03:00
RUN mkdir -pv /usr/share/shadowsocks-libev/plugins
RUN tag="$(curl -sSo /dev/null -w '%{redirect_url}' \
https://github.com/shadowsocks/v2ray-plugin/releases/latest | \
cut -d '/' -f 8)"; \
curl -sSL https://github.com/shadowsocks/v2ray-plugin/releases/download/$tag/v2ray-plugin-linux-amd64-$tag.tar.gz | \
tar xz -O > /usr/share/shadowsocks-libev/plugins/v2ray-plugin
RUN chmod +x /usr/share/shadowsocks-libev/plugins/v2ray-plugin
ENV SERVER_HOST="${SERVER_HOST:-0.0.0.0}"
2022-12-27 13:37:43 +03:00
ENV SERVER_IP="${SERVER_IP:-0.0.0.0}"
2022-12-15 03:14:16 +03:00
ENV SERVER_PORT="${SERVER_PORT:-8388}"
ENV PASSWORD="${PASSWORD:-secure_password}"
ENV METHOD="${METHOD:-chacha20-ietf-poly1305}"
ENV PLUGIN="${PLUGIN:-/usr/share/shadowsocks-libev/plugins/v2ray-plugin}"
ENV PLUGIN_OPTS="${PLUGIN_OPTS:-server}"
ENV TIMEOUT="${TIMEOUT:-300}"
ENV DNS="${DNS:-8.8.8.8,8.8.4.4}"
ENV TZ=UTC
ENV ARGS=
COPY entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
USER nobody
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
EXPOSE 8388
STOPSIGNAL SIGINT
CMD ["/usr/bin/ss-server"]