From 636ba2f0a2f74fe69b9dcb89db123124cfbecab5 Mon Sep 17 00:00:00 2001 From: Webber Date: Thu, 3 Mar 2022 16:19:47 +0100 Subject: [PATCH 1/9] feat: python-is-python3 and move build essentials to base --- images/ubuntu/base/Dockerfile | 4 ++++ images/ubuntu/editor/Dockerfile | 25 +------------------------ 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/images/ubuntu/base/Dockerfile b/images/ubuntu/base/Dockerfile index 572ff9dc..43122f24 100644 --- a/images/ubuntu/base/Dockerfile +++ b/images/ubuntu/base/Dockerfile @@ -25,8 +25,12 @@ RUN apt-get -q update \ libnss3 \ libxtst6 \ libxss1 \ + build-essential \ + clang \ cpio \ lsb-release \ + python-is-python3 \ + python-setuptools \ xvfb \ xz-utils \ && apt-get clean \ diff --git a/images/ubuntu/editor/Dockerfile b/images/ubuntu/editor/Dockerfile index 267fd0ec..581cdb5f 100644 --- a/images/ubuntu/editor/Dockerfile +++ b/images/ubuntu/editor/Dockerfile @@ -173,7 +173,7 @@ RUN echo "$version-$module" | grep -q -vP '^20(?!18).*android' \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ # Accept licenses - && yes | "${ANDROID_HOME}/tools/bin/sdkmanager" --licenses \ + && yes | "${ANDROID_HOME}/tools/bin/sdkmanager" --licenses \ \ # Update alias 'unity-editor' && { \ @@ -198,29 +198,6 @@ RUN echo "$module" | grep -q -v 'webgl' \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -#======================================================================================= -# [webgl, il2cpp] python python-setuptools build-essential clang -#======================================================================================= -RUN echo "$module" | grep -q -v '\(webgl\|linux-il2cpp\)' \ - && exit 0 \ - || : \ - && apt-get -q update \ - && apt-get -q install -y --no-install-recommends --allow-downgrades \ - python \ - python-setuptools \ - build-essential \ - clang \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -#======================================================================================= -# [android, ios] python 3 support -#======================================================================================= -RUN echo "$module" | grep -q -v '\(android\|ios\)' \ - && exit 0 \ - || : \ - && ln -s /usr/bin/python3 /usr/bin/python - #======================================================================================= # [2019.x] libnotify4 libunwind-dev libssl1.0 #======================================================================================= From 3a134d88fd51f2bc90db2834ca4aef1e8832f664 Mon Sep 17 00:00:00 2001 From: Webber Date: Mon, 7 Mar 2022 18:53:53 +0100 Subject: [PATCH 2/9] feat: use manual symlink instead and include pip3 --- images/ubuntu/base/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/images/ubuntu/base/Dockerfile b/images/ubuntu/base/Dockerfile index 43122f24..73b8747a 100644 --- a/images/ubuntu/base/Dockerfile +++ b/images/ubuntu/base/Dockerfile @@ -29,13 +29,16 @@ RUN apt-get -q update \ clang \ cpio \ lsb-release \ - python-is-python3 \ python-setuptools \ xvfb \ xz-utils \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +# Use python3 and pip3 as default +RUN ln -s /usr/bin/python /usr/bin/python3 \ + && ln -s /usr/bin/pip /usr/bin/pip3 + # Toolbox RUN apt-get -q update \ && apt-get -q install -y --no-install-recommends --allow-downgrades \ From a27b03477355975625446cbf9dd1c17b79cb3455 Mon Sep 17 00:00:00 2001 From: Webber Date: Mon, 7 Mar 2022 19:19:19 +0100 Subject: [PATCH 3/9] fix: derp --- images/ubuntu/base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/ubuntu/base/Dockerfile b/images/ubuntu/base/Dockerfile index 73b8747a..89938bce 100644 --- a/images/ubuntu/base/Dockerfile +++ b/images/ubuntu/base/Dockerfile @@ -36,8 +36,8 @@ RUN apt-get -q update \ && rm -rf /var/lib/apt/lists/* # Use python3 and pip3 as default -RUN ln -s /usr/bin/python /usr/bin/python3 \ - && ln -s /usr/bin/pip /usr/bin/pip3 +RUN ln -s /usr/bin/python3 /usr/bin/python \ + && ln -s /usr/bin/pip3 /usr/bin/pip # Toolbox RUN apt-get -q update \ From ec18f3a41a30804d10aa600f5f4f10c7be33afa2 Mon Sep 17 00:00:00 2001 From: Webber Date: Mon, 7 Mar 2022 19:31:22 +0100 Subject: [PATCH 4/9] fix: python already exists --- images/ubuntu/base/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/images/ubuntu/base/Dockerfile b/images/ubuntu/base/Dockerfile index 89938bce..80808dcd 100644 --- a/images/ubuntu/base/Dockerfile +++ b/images/ubuntu/base/Dockerfile @@ -36,8 +36,9 @@ RUN apt-get -q update \ && rm -rf /var/lib/apt/lists/* # Use python3 and pip3 as default -RUN ln -s /usr/bin/python3 /usr/bin/python \ - && ln -s /usr/bin/pip3 /usr/bin/pip +RUN python --version \ + && ln -s /usr/bin/pip3 /usr/bin/pip \ + && pip --version # Toolbox RUN apt-get -q update \ From d3a8cbcac07fa5dd33114418dc15475e4b223f0e Mon Sep 17 00:00:00 2001 From: Webber Date: Mon, 7 Mar 2022 19:35:20 +0100 Subject: [PATCH 5/9] feat: add python install --- images/ubuntu/base/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/images/ubuntu/base/Dockerfile b/images/ubuntu/base/Dockerfile index 80808dcd..9c9da798 100644 --- a/images/ubuntu/base/Dockerfile +++ b/images/ubuntu/base/Dockerfile @@ -29,6 +29,7 @@ RUN apt-get -q update \ clang \ cpio \ lsb-release \ + python \ python-setuptools \ xvfb \ xz-utils \ From cfeb0f5536eb97f4276343c77f691c8e10074b8c Mon Sep 17 00:00:00 2001 From: Webber Takken Date: Fri, 11 Mar 2022 00:27:03 +0100 Subject: [PATCH 6/9] Apply suggestions from code review Co-authored-by: David Finol --- images/ubuntu/base/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/images/ubuntu/base/Dockerfile b/images/ubuntu/base/Dockerfile index 9c9da798..ee9372de 100644 --- a/images/ubuntu/base/Dockerfile +++ b/images/ubuntu/base/Dockerfile @@ -29,18 +29,18 @@ RUN apt-get -q update \ clang \ cpio \ lsb-release \ - python \ - python-setuptools \ + python3-pip \ + python3-setuptools \ xvfb \ xz-utils \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Use python3 and pip3 as default -RUN python --version \ +RUN ln -s /usr/bin/python3 /usr/bin/python \ + && python --version \ && ln -s /usr/bin/pip3 /usr/bin/pip \ && pip --version - # Toolbox RUN apt-get -q update \ && apt-get -q install -y --no-install-recommends --allow-downgrades \ From 774b8b9b4e78bba1ec2362a888257631b21c088c Mon Sep 17 00:00:00 2001 From: Webber Takken Date: Fri, 11 Mar 2022 18:22:11 +0100 Subject: [PATCH 7/9] go back to installing python2 Co-authored-by: David Finol --- images/ubuntu/base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/ubuntu/base/Dockerfile b/images/ubuntu/base/Dockerfile index ee9372de..4d460f74 100644 --- a/images/ubuntu/base/Dockerfile +++ b/images/ubuntu/base/Dockerfile @@ -29,8 +29,8 @@ RUN apt-get -q update \ clang \ cpio \ lsb-release \ - python3-pip \ - python3-setuptools \ + python \ + python-setuptools \ xvfb \ xz-utils \ && apt-get clean \ From 6edb50667822253b5395acf98669f5ab34af2e9e Mon Sep 17 00:00:00 2001 From: Webber Takken Date: Fri, 11 Mar 2022 18:22:45 +0100 Subject: [PATCH 8/9] remove symlinks Co-authored-by: David Finol --- images/ubuntu/base/Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/images/ubuntu/base/Dockerfile b/images/ubuntu/base/Dockerfile index 4d460f74..1985dcc5 100644 --- a/images/ubuntu/base/Dockerfile +++ b/images/ubuntu/base/Dockerfile @@ -36,11 +36,6 @@ RUN apt-get -q update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# Use python3 and pip3 as default -RUN ln -s /usr/bin/python3 /usr/bin/python \ - && python --version \ - && ln -s /usr/bin/pip3 /usr/bin/pip \ - && pip --version # Toolbox RUN apt-get -q update \ && apt-get -q install -y --no-install-recommends --allow-downgrades \ From 9b0148b0faf041daba1a72173e1f69347b02a4bc Mon Sep 17 00:00:00 2001 From: Webber Date: Sat, 19 Mar 2022 18:30:31 +0100 Subject: [PATCH 9/9] redistribute installations based on their weight --- images/ubuntu/base/Dockerfile | 4 +--- images/ubuntu/editor/Dockerfile | 13 +++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/images/ubuntu/base/Dockerfile b/images/ubuntu/base/Dockerfile index 1985dcc5..d88bb403 100644 --- a/images/ubuntu/base/Dockerfile +++ b/images/ubuntu/base/Dockerfile @@ -25,8 +25,6 @@ RUN apt-get -q update \ libnss3 \ libxtst6 \ libxss1 \ - build-essential \ - clang \ cpio \ lsb-release \ python \ @@ -54,7 +52,7 @@ RUN apt-get -q update \ && apt-get -q install -y --no-install-recommends software-properties-common \ && add-apt-repository -y ppa:ubuntu-toolchain-r/test \ && apt-get -q install -y --only-upgrade libstdc++6 \ - && add-apt-repository -y --remove ppa:ubuntu-toolchain-r/test \ + && add-apt-repository -y --remove ppa:ubuntu-toolchain-r/test \ && apt-get -q remove -y --auto-remove software-properties-common \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/images/ubuntu/editor/Dockerfile b/images/ubuntu/editor/Dockerfile index 581cdb5f..81383796 100644 --- a/images/ubuntu/editor/Dockerfile +++ b/images/ubuntu/editor/Dockerfile @@ -198,6 +198,19 @@ RUN echo "$module" | grep -q -v 'webgl' \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +#======================================================================================= +# [webgl, il2cpp] python python-setuptools build-essential clang +#======================================================================================= +RUN echo "$module" | grep -q -v '\(webgl\|linux-il2cpp\)' \ + && exit 0 \ + || : \ + && apt-get -q update \ + && apt-get -q install -y --no-install-recommends --allow-downgrades \ + build-essential \ + clang \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + #======================================================================================= # [2019.x] libnotify4 libunwind-dev libssl1.0 #=======================================================================================