mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
Merge 0512949f23
into ddc2cfacb9
This commit is contained in:
commit
90f3081388
5 changed files with 14 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
# Start fail2ban
|
# Start fail2ban
|
||||||
fail2ban-client -x start
|
fail2ban-client -x start
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env sh
|
||||||
case $1 in
|
case $1 in
|
||||||
amd64)
|
amd64)
|
||||||
ARCH="64"
|
ARCH="64"
|
||||||
|
|
20
Dockerfile
20
Dockerfile
|
@ -1,15 +1,15 @@
|
||||||
# ========================================================
|
# ========================================================
|
||||||
# Stage: Builder
|
# Stage: Builder
|
||||||
# ========================================================
|
# ========================================================
|
||||||
FROM golang:1.23-alpine AS builder
|
FROM golang:1.23-bookworm AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
||||||
RUN apk --no-cache --update add \
|
RUN apt-get update -y
|
||||||
build-base \
|
RUN apt-get install -y \
|
||||||
gcc \
|
gcc \
|
||||||
wget \
|
wget \
|
||||||
unzip
|
unzip
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
@ -21,12 +21,12 @@ RUN ./DockerInit.sh "$TARGETARCH"
|
||||||
# ========================================================
|
# ========================================================
|
||||||
# Stage: Final Image of 3x-ui
|
# Stage: Final Image of 3x-ui
|
||||||
# ========================================================
|
# ========================================================
|
||||||
FROM alpine
|
FROM ubuntu:rolling
|
||||||
ENV TZ=Asia/Tehran
|
ENV TZ=Asia/Tehran
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apk add --no-cache --update \
|
RUN apt-get update -y
|
||||||
ca-certificates \
|
RUN apt-get install -y \
|
||||||
tzdata \
|
tzdata \
|
||||||
fail2ban \
|
fail2ban \
|
||||||
bash
|
bash
|
||||||
|
@ -37,7 +37,7 @@ COPY --from=builder /app/x-ui.sh /usr/bin/x-ui
|
||||||
|
|
||||||
|
|
||||||
# Configure fail2ban
|
# 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 \
|
&& cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local \
|
||||||
&& sed -i "s/^\[ssh\]$/&\nenabled = false/" /etc/fail2ban/jail.local \
|
&& sed -i "s/^\[ssh\]$/&\nenabled = false/" /etc/fail2ban/jail.local \
|
||||||
&& sed -i "s/^\[sshd\]$/&\nenabled = false/" /etc/fail2ban/jail.local \
|
&& sed -i "s/^\[sshd\]$/&\nenabled = false/" /etc/fail2ban/jail.local \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
red='\033[0;31m'
|
red='\033[0;31m'
|
||||||
green='\033[0;32m'
|
green='\033[0;32m'
|
||||||
|
|
2
x-ui.sh
2
x-ui.sh
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
red='\033[0;31m'
|
red='\033[0;31m'
|
||||||
green='\033[0;32m'
|
green='\033[0;32m'
|
||||||
|
|
Loading…
Reference in a new issue