7 lines
558 B
Docker
7 lines
558 B
Docker
FROM alpine:3.20
|
|
RUN apk add --no-cache ca-certificates wget unzip && wget -O /tmp/x.zip https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip && unzip /tmp/x.zip xray -d /usr/local/bin && chmod +x /usr/local/bin/xray && rm /tmp/x.zip
|
|
COPY config.json /etc/xray/config.json
|
|
ENV PORT=8080
|
|
# Yandex Serverless Container задаёт $PORT; Xray VLESS+WS слушает его (TLS терминит edge).
|
|
CMD ["/bin/sh","-c","sed \"s/8080/${PORT}/\" /etc/xray/config.json > /tmp/c.json && exec /usr/local/bin/xray run -c /tmp/c.json"]
|