Files
omar 6b8e08c1bf
Build and Publish Image / build (push) Has been cancelled
add Dockerfile
2026-06-24 15:01:51 -04:00

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"]