mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/docker-easyconnect/docker-easyconnect.git
synced 2026-09-20 08:03:33 +08:00
Refactor dockerfiles and add support for non-amd64 GUI
- split common part of dockerfiles to shell scripts in build-scripts folder - add support for non-amd64 GUI by replacing the electron binary with the native one
This commit is contained in:
@@ -1,33 +1,28 @@
|
||||
FROM debian:buster-slim
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
ARG BUILD_ENV=local
|
||||
ARG ANDROID_PATCH BUILD_ENV=local MIRROR_URL=http://mirrors.aliyun.com/debian/
|
||||
|
||||
RUN if [ "${BUILD_ENV}" = "local" ]; then sed -i s/deb.debian.org/mirrors.aliyun.com/ /etc/apt/sources.list; fi &&\
|
||||
COPY ["./build-scripts/pre_build.sh", "./build-scripts/set-mirror.sh", "/tmp/build-scripts/"]
|
||||
|
||||
RUN extra_pkg_cross="libxss1 libgconf-2-4" . /tmp/build-scripts/pre_build.sh && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests $extra_pkg \
|
||||
libgtk2.0-0 libx11-xcb1 libxtst6 libnss3 libasound2 libdbus-glib-1-2 iptables \
|
||||
dante-server psmisc libxaw7 xclip busybox libssl-dev iproute2 tinyproxy-bin
|
||||
dante-server psmisc libxaw7 xclip busybox libssl-dev iproute2 tinyproxy-bin && \
|
||||
cd /tmp && apt download x11-utils && dpkg -x x11-utils_*.deb x11-utils && \
|
||||
mkdir -p /usr/local/bin && cp x11-utils/usr/bin/xmessage /usr/local/bin && rm -r x11-utils* && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN cd tmp && apt update && apt download x11-utils && dpkg -x x11-utils_*.deb x11-utils &&\
|
||||
mkdir -p /usr/local/bin && cp x11-utils/usr/bin/xmessage /usr/local/bin && rm -r x11-utils*
|
||||
ARG EC_URL ELECTRON_URL
|
||||
|
||||
ARG EC_URL
|
||||
COPY ["./build-scripts/install-ec-gui.sh", "./build-scripts/mk-qemu-wrapper.sh", "/tmp/build-scripts/"]
|
||||
|
||||
RUN cd tmp && \
|
||||
busybox wget "${EC_URL}" -O EasyConnect.deb &&\
|
||||
dpkg -i EasyConnect.deb && rm EasyConnect.deb
|
||||
RUN /tmp/build-scripts/install-ec-gui.sh
|
||||
|
||||
COPY ./docker-root /
|
||||
|
||||
RUN rm -f /usr/share/sangfor/EasyConnect/resources/conf/easy_connect.json &&\
|
||||
mv /usr/share/sangfor/EasyConnect/resources/conf/ /usr/share/sangfor/EasyConnect/resources/conf_backup &&\
|
||||
ln -s /root/conf /usr/share/sangfor/EasyConnect/resources/conf
|
||||
|
||||
COPY --from=fake-hwaddr fake-hwaddr/fake-hwaddr.so /usr/local/lib/fake-hwaddr.so
|
||||
|
||||
#ENV PASSWORD="" LOOP=""
|
||||
#ENV DISPLAY
|
||||
|
||||
VOLUME /root/ /usr/share/sangfor/EasyConnect/resources/logs/
|
||||
|
||||
CMD TYPE=x11 start.sh
|
||||
|
||||
Reference in New Issue
Block a user