From 4e7421d0f38835924de270cf050f34c053f35029 Mon Sep 17 00:00:00 2001 From: Ilya Kunafin Date: Fri, 11 Oct 2024 13:49:32 +0400 Subject: [PATCH] logs --- .github/docker/Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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" ]