forked from kenvix/aTrustLogin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (32 loc) · 1.48 KB
/
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
31
32
33
34
35
36
37
38
FROM hagb/docker-atrust:latest
LABEL authors="Kenvix"
ENV TZ="Asia/Shanghai"
COPY ./docker/bin /bin
COPY ./src /opt/atrust-autologin
# 再次定义 ARG 变量以确保构建过程中可以使用这些参数
ARG ANDROID_PATCH
ARG EC_HOST
ARG VPN_TYPE=EC_GUI
ARG VPN_URL
ARG ELECTRON_URL
ARG USE_VPN_ELECTRON
ARG VPN_DEB_PATH
# 重新定义 ENV 变量,以确保环境变量在最终镜像中可用
ENV PING_INTERVAL=1800
# 保留基础镜像的卷(这会继承 `/root` 和 `/usr/share/sangfor/EasyConnect/resources/logs/` 的设置)
VOLUME ["/root", "/usr/share/sangfor/EasyConnect/resources/logs/"]
RUN echo "Begin build" && \
sed -i 's|http://.*archive.ubuntu.com|https://mirrors.ustc.edu.cn|g; s|http://.*security.ubuntu.com|https://mirrors.ustc.edu.cn|g' /etc/apt/sources.list && \
mkdir -p ~/.pip && \
sed -i 's|http://deb.debian.org|https://mirrors.ustc.edu.cn|g; s|http://security.debian.org|https://mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list && \
echo "[global]" > ~/.pip/pip.conf && \
echo "index-url = https://mirrors.ustc.edu.cn/pypi/web/simple" >> ~/.pip/pip.conf && \
chmod +x /bin/start-with-autologin.sh && \
apt-get update && \
apt-get install -y apt-utils && \
apt-get install -y chromium chromium-driver chromium-l10n python3 python3-pip && \
cd /opt/atrust-autologin && \
pip3 install --break-system-packages -r requirements.txt && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
CMD ["/bin/start-with-autologin.sh"]