Spaces:
Paused
Paused
Commit
·
44c6577
1
Parent(s):
fa60276
Update Dockerfile
Browse files- Dockerfile +16 -47
Dockerfile
CHANGED
@@ -1,57 +1,26 @@
|
|
1 |
-
# Use a lightweight base image
|
2 |
FROM debian:bullseye-slim
|
3 |
|
4 |
# Install necessary packages and clean up
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
curl \
|
9 |
-
tar \
|
10 |
-
ca-certificates \
|
11 |
-
--no-install-recommends && \
|
12 |
-
rm -rf /var/lib/apt/lists/*
|
13 |
-
|
14 |
-
# Install wgcf
|
15 |
-
RUN wget -O /usr/local/bin/wgcf https://github.com/ViRb3/wgcf/releases/download/v2.2.29/wgcf_2.2.29_linux_amd64 && \
|
16 |
-
chmod +x /usr/local/bin/wgcf
|
17 |
-
|
18 |
-
# Install wireproxy
|
19 |
-
RUN wget -O /tmp/wireproxy.tar.gz https://github.com/whyvl/wireproxy/releases/download/v1.0.9/wireproxy_linux_amd64.tar.gz && \
|
20 |
-
tar -xzf /tmp/wireproxy.tar.gz -C /usr/local/bin/ && \
|
21 |
-
chmod +x /usr/local/bin/wireproxy && \
|
22 |
-
rm /tmp/wireproxy.tar.gz
|
23 |
|
24 |
# Install chisel
|
25 |
-
ARG CHISEL_VERSION=1.
|
26 |
-
RUN wget https://github.com/jpillora/chisel/releases/download/v${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_amd64.gz -O /tmp/chisel.gz &&
|
27 |
-
gunzip /tmp/chisel.gz && \
|
28 |
-
mv /tmp/chisel /usr/local/bin/chisel && \
|
29 |
-
chmod +x /usr/local/bin/chisel
|
30 |
-
|
31 |
-
# Download and install x-ui
|
32 |
-
RUN LATEST_XUI_URL=$(curl -sL "https://api.github.com/repos/MHSanaei/3x-ui/releases/latest" | grep '"browser_download_url":' | grep 'linux-amd64.tar.gz' | sed -E 's/.*"([^"]+)".*/\1/') && \
|
33 |
-
wget -O /tmp/x-ui.tar.gz "${LATEST_XUI_URL}" && \
|
34 |
-
mkdir -p /opt/x-ui && \
|
35 |
-
tar -zxvf /tmp/x-ui.tar.gz -C /opt/x-ui && \
|
36 |
-
rm /tmp/x-ui.tar.gz && \
|
37 |
-
chmod +x /opt/x-ui/x-ui/x-ui
|
38 |
-
|
39 |
-
# Force rebuild by adding a changing ARG
|
40 |
-
ARG CACHE_BUSTER=20250903050820
|
41 |
-
|
42 |
-
# Copy the startup script and fix line endings
|
43 |
-
COPY start.sh /usr/local/bin/start.sh
|
44 |
-
RUN dos2unix /usr/local/bin/start.sh
|
45 |
-
RUN chmod +x /usr/local/bin/start.sh
|
46 |
|
47 |
-
#
|
|
|
48 |
|
49 |
-
#
|
|
|
50 |
|
51 |
-
#
|
52 |
-
|
53 |
|
54 |
-
|
|
|
55 |
|
56 |
-
# Set the entrypoint to
|
57 |
-
|
|
|
|
|
|
1 |
FROM debian:bullseye-slim
|
2 |
|
3 |
# Install necessary packages and clean up
|
4 |
+
ficates --no-install-recommends && rm -rf /var/lib/apt/lists/*
|
5 |
+
|
6 |
+
SHELL ["/bin/bash", "-c"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
# Install chisel
|
9 |
+
ARG CHISEL_VERSION=1.10.1
|
10 |
+
RUN wget https://github.com/jpillora/chisel/releases/download/v${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_amd64.gz -O /tmp/chisel.gz && gunzip /tmp/chisel.gz && mv /tmp/chisel /usr/local/bin/chisel && chmod +x /usr/local/bin/chisel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
# Download and extract 3x-ui
|
13 |
+
RUN ARCH=$(uname -m) && if [ "$ARCH" = "x86_64" ]; then ARCH="amd64"; fi && if [ "$ARCH" = "aarch64" ]; then ARCH="arm64"; fi && wget -O /usr/local/x-ui-linux-${ARCH}.tar.gz "https://github.com/MHSanaei/3x-ui/releases/latest/download/x-ui-linux-${ARCH}.tar.gz" && mkdir -p /usr/local/x-ui/ && tar -zxvf /usr/local/x-ui-linux-*.tar.gz -C /usr/local/x-ui/ --strip-components=1 && rm /usr/local/x-ui-linux-*.tar.gz && chmod +x /usr/local/x-ui/x-ui && cp /usr/local/x-ui/x-ui.sh /usr/bin/x-ui
|
14 |
|
15 |
+
# Copy the startup script
|
16 |
+
COPY start.sh /usr/local/bin/start.sh
|
17 |
|
18 |
+
# Make the script executable
|
19 |
+
RUN chmod +x /usr/local/bin/start.sh
|
20 |
|
21 |
+
# Expose the x-ui port
|
22 |
+
EXPOSE 2053
|
23 |
|
24 |
+
# Set the entrypoint to our startup script
|
25 |
+
RUN chmod -R 777 /usr/local/x-ui/
|
26 |
+
ENTRYPOINT ["/bin/bash", "-c", "/usr/local/bin/start.sh"]
|