mirror of
https://github.com/samuelhbne/server-xray.git
synced 2025-12-18 12:54:39 +03:00
Trivy compliant
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -9,8 +9,8 @@ RUN git clone https://github.com/XTLS/Xray-core.git . && \
|
|||||||
git checkout ${XRAYVER} && \
|
git checkout ${XRAYVER} && \
|
||||||
go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main
|
go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main
|
||||||
|
|
||||||
RUN cd /tmp; curl -sSLO https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
|
RUN curl -sSLO https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
|
||||||
RUN cd /tmp; curl -sSLO https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
|
RUN curl -sSLO https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
|
||||||
|
|
||||||
|
|
||||||
FROM nginx:stable-alpine3.20
|
FROM nginx:stable-alpine3.20
|
||||||
@@ -18,12 +18,13 @@ FROM nginx:stable-alpine3.20
|
|||||||
ARG ACMEVER='2.9.0'
|
ARG ACMEVER='2.9.0'
|
||||||
|
|
||||||
COPY --from=builder /go/src/XTLS/Xray-core/xray /usr/local/bin/
|
COPY --from=builder /go/src/XTLS/Xray-core/xray /usr/local/bin/
|
||||||
COPY --from=builder /tmp/geosite.dat /usr/local/bin/
|
COPY --from=builder /go/src/XTLS/Xray-core/geoip.dat /usr/local/bin/
|
||||||
COPY --from=builder /tmp/geoip.dat /usr/local/bin/
|
COPY --from=builder /go/src/XTLS/Xray-core/geosite.dat /usr/local/bin/
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
RUN apk add --no-cache bash openssl curl socat jq moreutils libcap-setcap
|
RUN apk add --no-cache bash openssl curl socat jq moreutils libcap-setcap
|
||||||
RUN cd /root; curl -sSL "https://github.com/acmesh-official/acme.sh/archive/refs/tags/${ACMEVER}.tar.gz"|tar zxvf -
|
RUN curl -sSL "https://github.com/acmesh-official/acme.sh/archive/refs/tags/${ACMEVER}.tar.gz"|tar zxvf -
|
||||||
RUN cd /root; ln -s acme.sh-${ACMEVER} acme.sh; mkdir .acme.sh
|
RUN ln -s acme.sh-${ACMEVER} acme.sh; mkdir .acme.sh
|
||||||
RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/nginx
|
RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/nginx
|
||||||
|
|
||||||
COPY nginx-site.tpl /etc/nginx/conf.d/
|
COPY nginx-site.tpl /etc/nginx/conf.d/
|
||||||
@@ -31,7 +32,6 @@ COPY nginx-stream.tpl /etc/nginx/conf.d/
|
|||||||
COPY nginx-proxy.tpl /etc/nginx/conf.d/
|
COPY nginx-proxy.tpl /etc/nginx/conf.d/
|
||||||
COPY nginx-grpc.tpl /etc/nginx/conf.d/
|
COPY nginx-grpc.tpl /etc/nginx/conf.d/
|
||||||
COPY nginx-ws.tpl /etc/nginx/conf.d/
|
COPY nginx-ws.tpl /etc/nginx/conf.d/
|
||||||
|
|
||||||
COPY proxy-log-fmt.tpl /etc/nginx/conf.d/000-proxy-log-fmt.conf
|
COPY proxy-log-fmt.tpl /etc/nginx/conf.d/000-proxy-log-fmt.conf
|
||||||
|
|
||||||
COPY server-lgp.sh /server-lgp.sh
|
COPY server-lgp.sh /server-lgp.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user