mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-17 23:43:03 +00:00
Compare commits
1 commit
706009ad4a
...
90f3081388
Author | SHA1 | Date | |
---|---|---|---|
![]() |
90f3081388 |
1 changed files with 8 additions and 14 deletions
22
Dockerfile
22
Dockerfile
|
@ -1,17 +1,15 @@
|
|||
# ========================================================
|
||||
# Stage: Builder
|
||||
# ========================================================
|
||||
FROM golang:1.23-alpine AS builder
|
||||
# because builder doesn't matter as i've tested recently
|
||||
|
||||
FROM golang:1.23-bookworm AS builder
|
||||
WORKDIR /app
|
||||
ARG TARGETARCH
|
||||
|
||||
RUN apk --no-cache --update add \
|
||||
build-base \
|
||||
gcc \
|
||||
wget \
|
||||
unzip
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y \
|
||||
gcc \
|
||||
wget \
|
||||
unzip
|
||||
|
||||
COPY . .
|
||||
|
||||
|
@ -23,16 +21,12 @@ RUN ./DockerInit.sh "$TARGETARCH"
|
|||
# ========================================================
|
||||
# Stage: Final Image of 3x-ui
|
||||
# ========================================================
|
||||
FROM ubuntu:devel
|
||||
# while being techniacally newer "devel" image proven to be more stable and more lightweight
|
||||
FROM ubuntu:rolling
|
||||
ENV TZ=Asia/Tehran
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y \
|
||||
--no-install-recommends \
|
||||
# to make image less "bloated" due of way apt works
|
||||
ca-certificates \
|
||||
tzdata \
|
||||
fail2ban \
|
||||
bash
|
||||
|
@ -43,7 +37,7 @@ COPY --from=builder /app/x-ui.sh /usr/bin/x-ui
|
|||
|
||||
|
||||
# Configure fail2ban
|
||||
RUN rm -f /etc/fail2ban/jail.d/alpine-ssh.conf \
|
||||
RUN rm -f /etc/fail2ban/jail.d/*.conf \
|
||||
&& cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local \
|
||||
&& sed -i "s/^\[ssh\]$/&\nenabled = false/" /etc/fail2ban/jail.local \
|
||||
&& sed -i "s/^\[sshd\]$/&\nenabled = false/" /etc/fail2ban/jail.local \
|
||||
|
|
Loading…
Reference in a new issue