Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2024-01-27 12:26:10 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2024-01-27 14:43:12 +0300
commita6742f395aa65201d56b456f97e9db39c82910ce (patch)
tree76b611de64d201c5edeadb29ad38239997f79965 /Dockerfile
parent9fba92d879767394535f70ba83f0a58d6b063a7d (diff)
remove multi protocol script
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 951d463b..7c3e64b2 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,8 +4,6 @@
FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS builder
WORKDIR /app
ARG TARGETARCH
-ENV CGO_ENABLED=1
-ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
RUN apk --no-cache --update add \
build-base \
@@ -15,6 +13,8 @@ RUN apk --no-cache --update add \
COPY . .
+ENV CGO_ENABLED=1
+ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
RUN go build -o build/x-ui main.go
RUN ./DockerInit.sh "$TARGETARCH"
@@ -28,11 +28,12 @@ WORKDIR /app
RUN apk add --no-cache --update \
ca-certificates \
tzdata \
- fail2ban
+ fail2ban \
+ bash
-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=builder /app/build/ /app/
+COPY --from=builder /app/DockerEntrypoint.sh /app/
+COPY --from=builder /app/x-ui /usr/bin/x-ui
# Configure fail2ban
RUN rm -f /etc/fail2ban/jail.d/alpine-ssh.conf \
@@ -47,4 +48,5 @@ RUN chmod +x \
/usr/bin/x-ui
VOLUME [ "/etc/x-ui" ]
+CMD [ "./x-ui" ]
ENTRYPOINT [ "/app/DockerEntrypoint.sh" ]