ngbs 3 年之前
父節點
當前提交
048ba81e5a
共有 2 個文件被更改,包括 8 次插入6 次删除
  1. 4 3
      x-ui/Dockerfile
  2. 4 3
      x-ui/Dockerfile.latest

+ 4 - 3
x-ui/Dockerfile

@@ -1,11 +1,12 @@
 # syntax=docker/dockerfile:1
 FROM golang:alpine AS builder
+ADD https://github.com/XTLS/Xray-core/releases/download/v.1.5.10/Xray-linux-64.zip /tmp
 WORKDIR /go/src
 RUN apk --no-cache add git gcc g++ && \
     git clone --depth 1 https://github.com/FranzKafkaYu/x-ui.git . && \
     go build main.go && \
-    export version=$(wget -qO- https://api.github.com/repos/XTLS/Xray-core/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/'); \
-    wget -P /tmp https://github.com/XTLS/Xray-core/releases/download/${version}/Xray-linux-64.zip; \
+    # export version=$(wget -qO- https://api.github.com/repos/XTLS/Xray-core/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/'); \
+    # wget -P /tmp https://github.com/XTLS/Xray-core/releases/download/${version}/Xray-linux-64.zip; \
     unzip /tmp/Xray-linux-64.zip -d /tmp; \
     mv /tmp/xray /tmp/xray-linux-amd64; \
     ls -la ./ && ls -la /tmp
@@ -14,6 +15,6 @@ FROM alpine
 COPY --from=builder /go/src/main /usr/local/bin/x-ui
 COPY --from=builder /tmp/*.dat /tmp/xray-linux-amd64 /bin
 RUN apk --no-cache add ca-certificates tzdata
-VOLUME [ "/etc/x-ui" ]
+VOLUME ["/etc/x-ui"]
 ENTRYPOINT ["/usr/local/bin/x-ui"]
 ENV PATH /usr/local/bin/x-ui:$PATH

+ 4 - 3
x-ui/Dockerfile.latest

@@ -1,11 +1,12 @@
 # syntax=docker/dockerfile:1
 FROM golang:latest AS builder
+ADD https://github.com/XTLS/Xray-core/releases/download/v.1.5.10/Xray-linux-64.zip /tmp
 WORKDIR /go/src
 RUN apt-get update && apt-get install -y --no-install-recommends -y unzip && \
     git clone --depth 1 https://github.com/FranzKafkaYu/x-ui.git . && \
     go build main.go && \
-    export version=$(wget -qO- https://api.github.com/repos/XTLS/Xray-core/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/'); \
-    wget -P /tmp https://github.com/XTLS/Xray-core/releases/download/${version}/Xray-linux-64.zip; \
+    # export version=$(wget -qO- https://api.github.com/repos/XTLS/Xray-core/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/'); \
+    # wget -P /tmp https://github.com/XTLS/Xray-core/releases/download/${version}/Xray-linux-64.zip; \
     unzip /tmp/Xray-linux-64.zip -d /tmp; \
     mv /tmp/xray /tmp/xray-linux-amd64; \
     ls -la ./ && ls -la /tmp
@@ -14,6 +15,6 @@ FROM debian:11-slim
 COPY --from=builder /go/src/main /usr/local/bin/x-ui
 COPY --from=builder /tmp/*.dat /tmp/xray-linux-amd64 /bin
 RUN apt-get update && apt-get install -y --no-install-recommends -y ca-certificates && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-VOLUME [ "/etc/x-ui" ]
+VOLUME ["/etc/x-ui"]
 ENTRYPOINT ["/usr/local/bin/x-ui"]
 ENV PATH /usr/local/bin/x-ui:$PATH