This commit is contained in:
Ilya Kunafin 2024-10-11 13:49:32 +04:00
parent af7232d545
commit 4e7421d0f3

View file

@ -10,17 +10,25 @@ ADD https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.
ADD https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat /loyalsoldier/geoip.dat
ADD https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat /loyalsoldier/geosite.dat
# chainguard/static contains only tzdata and ca-certificates, can be built with multiarch static binaries.
FROM --platform=linux/amd64 chainguard/static:latest
FROM --platform=linux/amd64 alpine:latest
WORKDIR /var/log/xray
COPY .github/docker/files/config.json /etc/xray/config.json
COPY --from=build --chmod=755 /src/xray /usr/bin/xray
RUN mkdir -p /var/log/xray && \
touch /var/log/xray/access.log && \
touch /var/log/xray/error.log && \
ln -sf /dev/stdout /var/log/xray/access.log && \
ln -sf /dev/stderr /var/log/xray/error.log
USER root
WORKDIR /root
VOLUME /etc/xray
ARG TZ=Asia/Shanghai
ENV TZ=$TZ
RUN apk add --no-cache tzdata
ENTRYPOINT [ "/usr/bin/xray" ]
CMD [ "-config", "/etc/xray/config.json" ]