diff --git a/.github/docker/Dockerfile b/.github/docker/Dockerfile index 31139529..9ca4e124 100644 --- a/.github/docker/Dockerfile +++ b/.github/docker/Dockerfile @@ -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" ]