mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/docker-easyconnect/docker-easyconnect.git
synced 2026-09-20 08:03:33 +08:00
Since non-amd64 deb packages of EasyConnect are proved to exist (https://github.com/Hagb/docker-easyconnect/issues/25#issuecomment-1233369467), the deb package should not be assume to be amd64 and architecture specific code should be rewritten: - Add EC_HOST build argument to tell Dockerfile the architecture of EasyConnect package - Whether to install cross toolchain and qemu-user and which package should be install, is determined by EC_HOST and the local architecture now, more specifically by build-scripts/get-echost-names.sh (no longer hard-code amd64 cross toolchain) - fake-hwaddr.so should follow the architecture of the EC deb, so fake-hwaddr/Makefile uses CC envirnoment variable instead of hard-coded x86_64-linux-gnu-gcc as c compiler now - qemu_args is removed now. It was used to pass LD_PRELOAD to foreign binaries under qemu-user, but now we pass LD_PRELOAD to the qemu wrapper and wrapper will pass the LD_PRELOAD to the simulated binaries
36 lines
1.3 KiB
Docker
36 lines
1.3 KiB
Docker
FROM debian:bookworm-slim
|
|
|
|
ARG ANDROID_PATCH BUILD_ENV=local MIRROR_URL=http://ftp.cn.debian.org/debian/ EC_HOST
|
|
|
|
COPY ["./build-scripts/config-apt.sh", "./build-scripts/get-echost-names.sh", "./build-scripts/add-qemu.sh", \
|
|
"/tmp/build-scripts/"]
|
|
|
|
RUN . /tmp/build-scripts/config-apt.sh && \
|
|
. /tmp/build-scripts/get-echost-names.sh && \
|
|
. /tmp/build-scripts/add-qemu.sh && \
|
|
apt-get update && \
|
|
apt-get install -y --no-install-recommends --no-install-suggests $qemu_pkgs ca-certificates \
|
|
libgtk2.0-0 libx11-xcb1 libxtst6 libnss3 libasound2 libdbus-glib-1-2 iptables \
|
|
dante-server psmisc libxaw7 xclip busybox libssl-dev iproute2 tinyproxy-bin libxss1 libgconf-2-4 && \
|
|
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 groupadd -r socks && useradd -r -g socks socks
|
|
|
|
COPY ["./build-scripts/install-ec-gui.sh", "./build-scripts/mk-qemu-wrapper.sh", "/tmp/build-scripts/"]
|
|
|
|
ARG EC_URL ELECTRON_URL USE_EC_ELECTRON
|
|
|
|
RUN /tmp/build-scripts/install-ec-gui.sh
|
|
|
|
COPY ./docker-root /
|
|
|
|
COPY --from=hagb/docker-easyconnect:build /results/fake-hwaddr/ /results/tinyproxy-ws/ /
|
|
|
|
ENV QEMU_ECAGENT_MEM_LIMIT=256
|
|
|
|
VOLUME /root/ /usr/share/sangfor/EasyConnect/resources/logs/
|
|
|
|
CMD TYPE=x11 start.sh
|