-
Notifications
You must be signed in to change notification settings - Fork 1
/
dockerfile
30 lines (25 loc) · 879 Bytes
/
dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM ubuntu:24.04
WORKDIR /
# Install necessary dependencies
RUN apt-get update && \
apt-get install -y sudo wget unzip dos2unix python-is-python3 python3-dev mariadb-server && \
apt-get clean
# Copy original xui.one & cracking file
COPY original_xui/database.sql /database.sql
COPY original_xui/xui.tar.gz /xui.tar.gz
COPY install.python3.py /install.python3.py
# Create a wrapper script that checks for installation
RUN echo '#!/bin/bash\n\
if [ -f "/home/xui/status" ]; then\n\
echo "XUI already installed, starting service..."\n\
service mariadb start\n\
/home/xui/service start\n\
else\n\
echo "Starting fresh installation..."\n\
python3 /install.python3.py\n\
fi\n\
tail -f /dev/null' > /wrapper.sh && \
chmod +x /wrapper.sh
VOLUME ["/home/xui", "/var/lib/mysql"]
EXPOSE 80
ENTRYPOINT ["/wrapper.sh"]