mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
modified: DockerEntrypoint.sh
modified: DockerInit.sh modified: Dockerfile modified: install.sh modified: x-ui.sh
This commit is contained in:
parent
2ce9c3cc81
commit
81ad39abc1
5 changed files with 14 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Start fail2ban
|
||||
fail2ban-client -x start
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
case $1 in
|
||||
amd64)
|
||||
ARCH="64"
|
||||
|
|
14
Dockerfile
14
Dockerfile
|
@ -1,12 +1,12 @@
|
|||
# ========================================================
|
||||
# Stage: Builder
|
||||
# ========================================================
|
||||
FROM golang:1.23-alpine AS builder
|
||||
FROM golang:1.23-bookworm AS builder
|
||||
WORKDIR /app
|
||||
ARG TARGETARCH
|
||||
|
||||
RUN apk --no-cache --update add \
|
||||
build-base \
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y \
|
||||
gcc \
|
||||
wget \
|
||||
unzip
|
||||
|
@ -21,12 +21,12 @@ RUN ./DockerInit.sh "$TARGETARCH"
|
|||
# ========================================================
|
||||
# Stage: Final Image of 3x-ui
|
||||
# ========================================================
|
||||
FROM alpine
|
||||
FROM ubuntu:rolling
|
||||
ENV TZ=Asia/Tehran
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache --update \
|
||||
ca-certificates \
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y \
|
||||
tzdata \
|
||||
fail2ban \
|
||||
bash
|
||||
|
@ -37,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 \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
red='\033[0;31m'
|
||||
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'
|
||||
green='\033[0;32m'
|
||||
|
|
Loading…
Reference in a new issue