chokatrue commited on
Commit
ec9c61c
·
verified ·
1 Parent(s): 717f9c8

Delete Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -56
Dockerfile DELETED
@@ -1,56 +0,0 @@
1
- # ========================================================
2
- # Stage: Builder
3
- # ========================================================
4
- FROM golang:1.23-alpine AS builder
5
- WORKDIR /app
6
- ARG TARGETARCH
7
-
8
- RUN git clone https://github.com/MHSanaei/3x-ui.git
9
- RUN cd 3x-ui
10
-
11
- RUN apk --no-cache --update add \
12
- build-base \
13
- gcc \
14
- wget \
15
- unzip
16
-
17
- COPY . .
18
-
19
- ENV CGO_ENABLED=1
20
- ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
21
- RUN go build -o build/x-ui main.go
22
- RUN ./DockerInit.sh "$TARGETARCH"
23
-
24
- # ========================================================
25
- # Stage: Final Image of 3x-ui
26
- # ========================================================
27
- FROM alpine
28
- ENV TZ=Asia/Tehran
29
- WORKDIR /app
30
-
31
- RUN apk add --no-cache --update \
32
- ca-certificates \
33
- tzdata \
34
- fail2ban \
35
- bash
36
-
37
- COPY --from=builder /app/build/ /app/
38
- COPY --from=builder /app/DockerEntrypoint.sh /app/
39
- COPY --from=builder /app/x-ui.sh /usr/bin/x-ui
40
-
41
-
42
- # Configure fail2ban
43
- RUN rm -f /etc/fail2ban/jail.d/alpine-ssh.conf \
44
- && cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local \
45
- && sed -i "s/^\[ssh\]$/&\nenabled = false/" /etc/fail2ban/jail.local \
46
- && sed -i "s/^\[sshd\]$/&\nenabled = false/" /etc/fail2ban/jail.local \
47
- && sed -i "s/#allowipv6 = auto/allowipv6 = auto/g" /etc/fail2ban/fail2ban.conf
48
-
49
- RUN chmod +x \
50
- /app/DockerEntrypoint.sh \
51
- /app/x-ui \
52
- /usr/bin/x-ui
53
-
54
- VOLUME [ "/etc/x-ui" ]
55
- CMD [ "./x-ui" ]
56
- ENTRYPOINT [ "/app/DockerEntrypoint.sh" ]