Dockerfile 549 B

12345678910111213141516171819
  1. FROM golang:latest AS builder
  2. LABEL maintainer="Stille <[email protected]>"
  3. ENV VERSION 0.3.3.18
  4. WORKDIR /root
  5. RUN git clone https://github.com/FranzKafkaYu/x-ui
  6. RUN cd x-ui && go build main.go
  7. FROM debian:11-slim
  8. RUN apt-get update \
  9. && apt-get install -y --no-install-recommends -y ca-certificates \
  10. && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  11. ENV TZ=Asia/Shanghai
  12. WORKDIR /root
  13. COPY --from=builder /root/x-ui/main /root/x-ui
  14. COPY --from=builder /root/x-ui/bin/. /root/bin/.
  15. VOLUME [ "/etc/x-ui" ]
  16. CMD [ "./x-ui" ]