2022-11-16 10:47:33 +08:00
|
|
|
FROM golang:latest AS builder
|
2022-02-01 22:01:09 +08:00
|
|
|
LABEL maintainer="Stille <stille@ioiox.com>"
|
2021-08-01 20:46:29 +08:00
|
|
|
|
2022-11-16 12:26:53 +08:00
|
|
|
ENV VERSION 0.3.3.18
|
2021-08-01 20:46:29 +08:00
|
|
|
|
2022-11-16 10:47:33 +08:00
|
|
|
WORKDIR /root
|
2022-11-16 12:26:53 +08:00
|
|
|
RUN git clone https://github.com/FranzKafkaYu/x-ui
|
|
|
|
RUN cd x-ui && go build main.go
|
2021-08-01 20:46:29 +08:00
|
|
|
|
2022-11-16 10:47:33 +08:00
|
|
|
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/*
|
|
|
|
ENV TZ=Asia/Shanghai
|
|
|
|
WORKDIR /root
|
2022-11-16 12:26:53 +08:00
|
|
|
COPY --from=builder /root/x-ui/main /root/x-ui
|
|
|
|
COPY --from=builder /root/x-ui/bin/. /root/bin/.
|
2022-11-16 10:47:33 +08:00
|
|
|
VOLUME [ "/etc/x-ui" ]
|
|
|
|
CMD [ "./x-ui" ]
|