ngbs 3 years ago
parent
commit
e04969ed27
2 changed files with 3 additions and 14 deletions
  1. 1 5
      x-ui/Dockerfile
  2. 2 9
      x-ui/Dockerfile.latest

+ 1 - 5
x-ui/Dockerfile

@@ -1,8 +1,6 @@
 # syntax=docker/dockerfile:1
 FROM golang:alpine AS builder
-
 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 && \
@@ -13,11 +11,9 @@ RUN apk --no-cache add git gcc g++ && \
     ls -la ./ && ls -la /tmp
 
 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" ]
 ENTRYPOINT ["/usr/local/bin/x-ui"]
 ENV PATH /usr/local/bin/x-ui:$PATH

+ 2 - 9
x-ui/Dockerfile.latest

@@ -1,8 +1,6 @@
 # syntax=docker/dockerfile:1
 FROM golang:latest AS builder
-
 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 && \
@@ -13,14 +11,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends -y unzip && \
     ls -la ./ && ls -la /tmp
 
 FROM debian:11-slim
-
-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" ]
-
 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" ]
 ENTRYPOINT ["/usr/local/bin/x-ui"]
 ENV PATH /usr/local/bin/x-ui:$PATH