From 9ab90d945f61a0fceddcf86f1cee2837e86f5e5a Mon Sep 17 00:00:00 2001 From: Jackeagle <116548-Jackeagle@users.noreply.gitlab.e.foundation> Date: Fri, 26 Sep 2025 19:10:44 +0530 Subject: [PATCH] Dockerfile: Include Python 2.7 for legacy devices --- Dockerfile | 14 ++++++++++++++ Dockerfile.community | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8771395..49c8f88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -202,6 +202,20 @@ RUN apt-get install -y android-sdk-libsparse-utils bc bison bsdmainutils build-e procps python3 python-is-python3 rsync schedtool squashfs-tools software-properties-common wget xdelta3 xsltproc xxd yasm \ zip zlib1g-dev +# Install Python 2.7 for legacy device support +RUN apt-get install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev \ + libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev libbz2-dev + +RUN cd /tmp && \ + wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz && \ + tar xzf Python-2.7.18.tgz && \ + cd Python-2.7.18 && \ + ./configure --prefix=/usr/local --enable-shared --enable-optimizations && \ + make -j$(nproc) && \ + make altinstall && \ + ln -sf /usr/local/bin/python2.7 /usr/bin/python2 && \ + cd / && rm -rf /tmp/Python-2.7.18* + RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo RUN chmod a+x /usr/local/bin/repo diff --git a/Dockerfile.community b/Dockerfile.community index 6cee5eb..6cb78fd 100644 --- a/Dockerfile.community +++ b/Dockerfile.community @@ -185,6 +185,20 @@ RUN apt-get install -y android-sdk-libsparse-utils bc bison bsdmainutils build-e procps python3 python-is-python3 rsync schedtool squashfs-tools software-properties-common wget xdelta3 xsltproc xxd yasm \ zip zlib1g-dev +# Install Python 2.7 for legacy device support +RUN apt-get install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev \ + libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev libbz2-dev + +RUN cd /tmp && \ + wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz && \ + tar xzf Python-2.7.18.tgz && \ + cd Python-2.7.18 && \ + ./configure --prefix=/usr/local --enable-shared --enable-optimizations && \ + make -j$(nproc) && \ + make altinstall && \ + ln -sf /usr/local/bin/python2.7 /usr/bin/python2 && \ + cd / && rm -rf /tmp/Python-2.7.18* + RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo RUN chmod a+x /usr/local/bin/repo -- GitLab