diff --git a/Dockerfile b/Dockerfile index e3d04a17..56e6a3d2 100644 --- a/Dockerfile +++ b/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" ]