mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-11-29 02:42:51 +00:00
Quick docker refactoring
This commit is contained in:
parent
e1058b1eaf
commit
1012636d35
1 changed files with 7 additions and 8 deletions
15
Dockerfile
15
Dockerfile
|
|
@ -5,7 +5,7 @@ FROM golang:1.25-alpine AS builder
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk --no-cache --update add \
|
||||
RUN apk add --no-cache \
|
||||
build-base \
|
||||
gcc
|
||||
|
||||
|
|
@ -28,12 +28,12 @@ ARG TARGETARCH
|
|||
ARG XRAY_VERSION
|
||||
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache wget unzip
|
||||
RUN apk add --no-cache wget unzip && mkdir -p /app/bin
|
||||
|
||||
COPY xray-tools.sh .
|
||||
RUN chmod +x /app/xray-tools.sh
|
||||
RUN ./xray-tools.sh install_xray_core "$TARGETARCH" "/app/bin" "$XRAY_VERSION"
|
||||
RUN ./xray-tools.sh update_geodata_in_docker "/app/bin"
|
||||
RUN chmod +x /app/xray-tools.sh && \
|
||||
./xray-tools.sh install_xray_core "$TARGETARCH" "/app/bin" "$XRAY_VERSION" && \
|
||||
./xray-tools.sh update_geodata_in_docker "/app/bin"
|
||||
|
||||
# ========================================================
|
||||
# Stage: Final Image of 3x-ui
|
||||
|
|
@ -42,7 +42,7 @@ FROM alpine
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache --update \
|
||||
RUN apk add --no-cache \
|
||||
ca-certificates \
|
||||
tzdata \
|
||||
fail2ban \
|
||||
|
|
@ -50,7 +50,6 @@ RUN apk add --no-cache --update \
|
|||
|
||||
COPY DockerEntrypoint.sh /app/
|
||||
COPY --from=builder /app/build/ /app/
|
||||
#COPY --from=builder /app/DockerEntrypoint.sh /app/
|
||||
COPY --from=builder /app/x-ui.sh /usr/bin/x-ui
|
||||
COPY --from=xray-downloader /app/bin /app/bin
|
||||
|
||||
|
|
@ -70,5 +69,5 @@ RUN chmod +x \
|
|||
ENV XUI_ENABLE_FAIL2BAN="true"
|
||||
EXPOSE 2053
|
||||
VOLUME [ "/etc/x-ui" ]
|
||||
#CMD [ "./x-ui" ]
|
||||
|
||||
ENTRYPOINT [ "/app/DockerEntrypoint.sh" ]
|
||||
|
|
|
|||
Loading…
Reference in a new issue