From 35fc8ad8ce5a2b89f0d97e84886a866d35ee3e80 Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Wed, 30 Sep 2020 09:24:47 -0300 Subject: [PATCH 01/24] Including a new option '--enable-shared' --- install_python.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install_python.sh b/install_python.sh index 6ab7cb6..78a5885 100644 --- a/install_python.sh +++ b/install_python.sh @@ -43,7 +43,8 @@ function build_cpython () { --enable-optimizations \ --with-lto \ --enable-loadable-sqlite-extensions \ - --enable-ipv6 + --enable-ipv6 \ + --enable-shared else ./configure --prefix="${1}" \ --exec_prefix="${1}" \ @@ -52,6 +53,7 @@ function build_cpython () { --with-lto \ --enable-loadable-sqlite-extensions \ --enable-ipv6 \ + --enable-shared \ --with-threads fi printf "\n### make -j%s\n" "${NPROC}" From 95ed0760c13e6e4ddfc571949455d5de2846656e Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Wed, 30 Sep 2020 09:26:00 -0300 Subject: [PATCH 02/24] Adding new packages for my work need --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Dockerfile b/Dockerfile index 2481d44..c63697e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,6 +38,17 @@ RUN apt-get -qq -y update && \ bash-completion \ tree \ vim \ + llvm \ + xz-utils \ + libxml2 \ + unixodbc-dev \ + apache2-dev \ + libxrender-dev \ + default-libmysqlclient-dev \ + libsm6 \ + libxext6 \ + zlib1g-dev \ + libxmlsec1-dev \ software-properties-common && \ mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ apt-get -y autoclean && \ From de40e827b950ef181a786df9bb1e373bad9c8c64 Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Wed, 30 Sep 2020 09:26:34 -0300 Subject: [PATCH 03/24] Configured for python 3.7.9 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c63697e..48ac0ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,8 @@ WORKDIR /root SHELL [ "/bin/bash", "-c" ] -ARG PYTHON_VERSION_TAG=3.8.3 -ARG LINK_PYTHON_TO_PYTHON3=1 +ARG PYTHON_VERSION_TAG=3.7.9 +ARG LINK_PYTHON_TO_PYTHON3=0 # Existing lsb_release causes issues with modern installations of Python3 # https://github.com/pypa/pip/issues/4924#issuecomment-435825490 From c3333fd17caa9e2cc5ed7e2c09eecf98896252aa Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Wed, 14 Oct 2020 15:35:39 -0300 Subject: [PATCH 04/24] Adicionando o pacote virtualenv --- install_python.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install_python.sh b/install_python.sh index 78a5885..5ad1cf4 100644 --- a/install_python.sh +++ b/install_python.sh @@ -68,11 +68,11 @@ function update_pip { # Update pip, setuptools, and wheel if [[ "$(id -u)" -eq 0 ]]; then # If root - printf "\n### pip3 install --upgrade --no-cache-dir pip setuptools wheel\n" - pip3 install --upgrade --no-cache-dir pip setuptools wheel + printf "\n### pip3 install --upgrade --no-cache-dir pip setuptools wheel virtualenv\n" + pip3 install --upgrade --no-cache-dir pip setuptools wheel virtualenv else - printf "\n### pip3 install --user --upgrade --no-cache-dir pip setuptools wheel\n" - pip3 install --user --upgrade --no-cache-dir pip setuptools wheel + printf "\n### pip3 install --user --upgrade --no-cache-dir pip setuptools wheel virtualenv\n" + pip3 install --user --upgrade --no-cache-dir pip setuptools wheel virtualenv fi } From 07af7689e8b3066c4158ebc82f73c1814d0a4e85 Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Mon, 30 Nov 2020 19:57:45 -0300 Subject: [PATCH 05/24] remove dependency unixodbc-dev --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 48ac0ad..d790755 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,6 @@ RUN apt-get -qq -y update && \ llvm \ xz-utils \ libxml2 \ - unixodbc-dev \ apache2-dev \ libxrender-dev \ default-libmysqlclient-dev \ From cb90f845cfcd81f4041d34fbbb1453bfac3d6a32 Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Mon, 30 Nov 2020 19:58:32 -0300 Subject: [PATCH 06/24] Removed hack (why?!?) --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d790755..fbe6900 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,6 @@ RUN apt-get -qq -y update && \ zlib1g-dev \ libxmlsec1-dev \ software-properties-common && \ - mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ apt-get -y autoclean && \ apt-get -y autoremove && \ rm -rf /var/lib/apt-get/lists/* From 72d06ed57e5790933c8c1f1b5ddec3a8daba96e9 Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Thu, 3 Dec 2020 16:21:35 -0300 Subject: [PATCH 07/24] # Existing lsb_release causes issues with modern installations of Python3 # https://github.com/pypa/pip/issues/4924#issuecomment-435825490 --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index fbe6900..d790755 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,6 +49,7 @@ RUN apt-get -qq -y update && \ zlib1g-dev \ libxmlsec1-dev \ software-properties-common && \ + mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ apt-get -y autoclean && \ apt-get -y autoremove && \ rm -rf /var/lib/apt-get/lists/* From f26c7465518bac2204c034c71033081198902d7d Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Thu, 3 Dec 2020 16:21:48 -0300 Subject: [PATCH 08/24] Revert "remove dependency unixodbc-dev" This reverts commit 07af7689e8b3066c4158ebc82f73c1814d0a4e85. --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index d790755..48ac0ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,6 +41,7 @@ RUN apt-get -qq -y update && \ llvm \ xz-utils \ libxml2 \ + unixodbc-dev \ apache2-dev \ libxrender-dev \ default-libmysqlclient-dev \ From 73f923abfa70795da8ae906ba613f266abe39873 Mon Sep 17 00:00:00 2001 From: Gustavo Brito Pereira <40372649+GustavoBPereira@users.noreply.github.com> Date: Wed, 17 Nov 2021 12:09:20 -0300 Subject: [PATCH 09/24] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 48ac0ad..c338e0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,6 +49,7 @@ RUN apt-get -qq -y update && \ libxext6 \ zlib1g-dev \ libxmlsec1-dev \ + libmediainfo-dev \ software-properties-common && \ mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ apt-get -y autoclean && \ From 61fcc5954573457c10bacdda7deb41f54fc57102 Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Wed, 1 Dec 2021 19:44:35 -0300 Subject: [PATCH 10/24] Configured for python 3.9.9 --- Dockerfile | 7 ++++--- install_python.sh | 32 ++++++++++---------------------- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/Dockerfile b/Dockerfile index c338e0b..f4882ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /root SHELL [ "/bin/bash", "-c" ] -ARG PYTHON_VERSION_TAG=3.7.9 +ARG PYTHON_VERSION_TAG=3.9.9 ARG LINK_PYTHON_TO_PYTHON3=0 # Existing lsb_release causes issues with modern installations of Python3 @@ -22,11 +22,12 @@ RUN apt-get -qq -y update && \ libssl-dev \ libbz2-dev \ libsqlite3-dev \ - libncurses5-dev \ + libncursesw5-dev \ libgdbm-dev \ + libc6-dev \ libgdbm-compat-dev \ liblzma-dev \ - libreadline-dev \ + libreadline-gplv2-dev \ uuid-dev \ libffi-dev \ tk-dev \ diff --git a/install_python.sh b/install_python.sh index 5ad1cf4..a4c2a8c 100644 --- a/install_python.sh +++ b/install_python.sh @@ -35,27 +35,15 @@ function build_cpython () { printf "\n### ./configure --help\n" ./configure --help printf "\n### ./configure\n" - if [[ "${2}" > "3.7.0" ]]; then - # --with-threads is removed in Python 3.7 (threading already on) - ./configure --prefix="${1}" \ - --exec_prefix="${1}" \ - --with-ensurepip \ - --enable-optimizations \ - --with-lto \ - --enable-loadable-sqlite-extensions \ - --enable-ipv6 \ - --enable-shared - else - ./configure --prefix="${1}" \ - --exec_prefix="${1}" \ - --with-ensurepip \ - --enable-optimizations \ - --with-lto \ - --enable-loadable-sqlite-extensions \ - --enable-ipv6 \ - --enable-shared \ - --with-threads - fi + ./configure --prefix="${1}" \ + --exec_prefix="${1}" \ + --with-ensurepip \ + --enable-optimizations \ + --with-lto \ + --enable-loadable-sqlite-extensions \ + --enable-ipv6 \ + --enable-shared + printf "\n### make -j%s\n" "${NPROC}" make -j"${NPROC}" printf "\n### make -j%s test\n" "${NPROC}" @@ -103,7 +91,7 @@ function main() { # 1: the Python version tag # 2: bool of if should symlink python and pip to python3 versions - PYTHON_VERSION_TAG=3.8.1 + PYTHON_VERSION_TAG=3.9.9 LINK_PYTHON_TO_PYTHON3=0 # By default don't link so as to reserve python for Python 2 if [[ $# -gt 0 ]]; then PYTHON_VERSION_TAG="${1}" From 17873eea4b1a5c9c4827f4d4745d74d56def89e8 Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Tue, 7 Dec 2021 17:51:27 -0300 Subject: [PATCH 11/24] Including python-av dependencies --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index f4882ae..3bc8bb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,6 +40,14 @@ RUN apt-get -qq -y update && \ tree \ vim \ llvm \ + pkg-config \ + libavformat-dev \ + libavcodec-dev \ + libavdevice-dev \ + libavutil-dev \ + libswscale-dev \ + libswresample-dev \ + libavfilter-dev \ xz-utils \ libxml2 \ unixodbc-dev \ From 87e229157d93e193da40d9fc2ac0d8f6a6a4d60c Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Thu, 1 Sep 2022 13:48:22 -0300 Subject: [PATCH 12/24] Configured for python 3.9.13 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3bc8bb5..e0ae9b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /root SHELL [ "/bin/bash", "-c" ] -ARG PYTHON_VERSION_TAG=3.9.9 +ARG PYTHON_VERSION_TAG=3.9.13 ARG LINK_PYTHON_TO_PYTHON3=0 # Existing lsb_release causes issues with modern installations of Python3 From 839c274c1834a950765852265442a1dd0c712dbc Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Fri, 21 Oct 2022 10:09:44 -0300 Subject: [PATCH 13/24] Including unzip and libcairo2 dependencies --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index e0ae9b7..66dbf7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,6 +59,8 @@ RUN apt-get -qq -y update && \ zlib1g-dev \ libxmlsec1-dev \ libmediainfo-dev \ + unzip \ + libcairo2-dev \ software-properties-common && \ mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ apt-get -y autoclean && \ From 00508ec83f30c100c1414e0d955fdc9035c98caf Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Thu, 29 Dec 2022 12:05:00 -0300 Subject: [PATCH 14/24] Including chromium-browser dependencies Configured for python 3.9.16 --- Dockerfile | 3 ++- install_python.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 66dbf7a..d8b2f60 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /root SHELL [ "/bin/bash", "-c" ] -ARG PYTHON_VERSION_TAG=3.9.13 +ARG PYTHON_VERSION_TAG=3.9.16 ARG LINK_PYTHON_TO_PYTHON3=0 # Existing lsb_release causes issues with modern installations of Python3 @@ -61,6 +61,7 @@ RUN apt-get -qq -y update && \ libmediainfo-dev \ unzip \ libcairo2-dev \ + chromium-browser \ software-properties-common && \ mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ apt-get -y autoclean && \ diff --git a/install_python.sh b/install_python.sh index a4c2a8c..a4a93dc 100644 --- a/install_python.sh +++ b/install_python.sh @@ -91,7 +91,7 @@ function main() { # 1: the Python version tag # 2: bool of if should symlink python and pip to python3 versions - PYTHON_VERSION_TAG=3.9.9 + PYTHON_VERSION_TAG=3.9.16 LINK_PYTHON_TO_PYTHON3=0 # By default don't link so as to reserve python for Python 2 if [[ $# -gt 0 ]]; then PYTHON_VERSION_TAG="${1}" From 3fb49e224626b98df7f30e7884d96f6fd9d896db Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Tue, 14 Mar 2023 10:10:42 -0300 Subject: [PATCH 15/24] Ajustando para incluir o apache2 E dividindo os apt-get para evitar erros de network do docker --- Dockerfile | 56 +++++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/Dockerfile b/Dockerfile index d8b2f60..a98c3fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ ARG LINK_PYTHON_TO_PYTHON3=0 # Existing lsb_release causes issues with modern installations of Python3 # https://github.com/pypa/pip/issues/4924#issuecomment-435825490 # Set (temporarily) DEBIAN_FRONTEND to avoid interacting with tzdata -RUN apt-get -qq -y update && \ +RUN apt-get -qq -y update --fix-missing && \ DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \ gcc \ g++ \ @@ -38,31 +38,35 @@ RUN apt-get -qq -y update && \ sudo \ bash-completion \ tree \ - vim \ - llvm \ - pkg-config \ - libavformat-dev \ - libavcodec-dev \ - libavdevice-dev \ - libavutil-dev \ - libswscale-dev \ - libswresample-dev \ - libavfilter-dev \ - xz-utils \ - libxml2 \ - unixodbc-dev \ - apache2-dev \ - libxrender-dev \ - default-libmysqlclient-dev \ - libsm6 \ - libxext6 \ - zlib1g-dev \ - libxmlsec1-dev \ - libmediainfo-dev \ - unzip \ - libcairo2-dev \ - chromium-browser \ - software-properties-common && \ + vim + + +RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \ + llvm \ + pkg-config \ + libavformat-dev \ + libavcodec-dev \ + libavdevice-dev \ + libavutil-dev \ + libswscale-dev \ + libswresample-dev \ + libavfilter-dev \ + xz-utils \ + libxml2 \ + unixodbc-dev \ + apache2 \ + apache2-dev \ + libxrender-dev \ + default-libmysqlclient-dev \ + libsm6 \ + libxext6 \ + zlib1g-dev \ + libxmlsec1-dev \ + libmediainfo-dev \ + unzip \ + libcairo2-dev \ + chromium-browser \ + software-properties-common && \ mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ apt-get -y autoclean && \ apt-get -y autoremove && \ From 77beaf887d352a02ca3a583ca873fed16137b0ce Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Wed, 17 May 2023 15:57:33 -0300 Subject: [PATCH 16/24] Including mysql-client and removing apache2 dependencies --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a98c3fc..602b4a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,10 +54,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \ xz-utils \ libxml2 \ unixodbc-dev \ - apache2 \ - apache2-dev \ libxrender-dev \ default-libmysqlclient-dev \ + mysql-client \ libsm6 \ libxext6 \ zlib1g-dev \ From 97311aaedc8d6f9d3711849df00bf79dbccbd956 Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Tue, 26 Sep 2023 17:32:25 -0300 Subject: [PATCH 17/24] =?UTF-8?q?Subindo=20a=20vers=C3=A3o=20para=20debian?= =?UTF-8?q?=2022.04=20E=20python=20para=203.9.18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 68 ++++++++++++++++++++++------------------------- install_python.sh | 2 +- 2 files changed, 33 insertions(+), 37 deletions(-) diff --git a/Dockerfile b/Dockerfile index 602b4a8..229ea8e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:bionic +FROM ubuntu:jammy MAINTAINER Matthew Feickert @@ -7,7 +7,7 @@ WORKDIR /root SHELL [ "/bin/bash", "-c" ] -ARG PYTHON_VERSION_TAG=3.9.16 +ARG PYTHON_VERSION_TAG=3.9.18 ARG LINK_PYTHON_TO_PYTHON3=0 # Existing lsb_release causes issues with modern installations of Python3 @@ -17,7 +17,6 @@ RUN apt-get -qq -y update --fix-missing && \ DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \ gcc \ g++ \ - zlibc \ zlib1g-dev \ libssl-dev \ libbz2-dev \ @@ -27,7 +26,7 @@ RUN apt-get -qq -y update --fix-missing && \ libc6-dev \ libgdbm-compat-dev \ liblzma-dev \ - libreadline-gplv2-dev \ + libreadline-dev \ uuid-dev \ libffi-dev \ tk-dev \ @@ -38,38 +37,35 @@ RUN apt-get -qq -y update --fix-missing && \ sudo \ bash-completion \ tree \ - vim - - -RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \ - llvm \ - pkg-config \ - libavformat-dev \ - libavcodec-dev \ - libavdevice-dev \ - libavutil-dev \ - libswscale-dev \ - libswresample-dev \ - libavfilter-dev \ - xz-utils \ - libxml2 \ - unixodbc-dev \ - libxrender-dev \ - default-libmysqlclient-dev \ - mysql-client \ - libsm6 \ - libxext6 \ - zlib1g-dev \ - libxmlsec1-dev \ - libmediainfo-dev \ - unzip \ - libcairo2-dev \ - chromium-browser \ - software-properties-common && \ - mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ - apt-get -y autoclean && \ - apt-get -y autoremove && \ - rm -rf /var/lib/apt-get/lists/* + vim \ + llvm \ + pkg-config \ + libavformat-dev \ + libavcodec-dev \ + libavdevice-dev \ + libavutil-dev \ + libswscale-dev \ + libswresample-dev \ + libavfilter-dev \ + xz-utils \ + libxml2 \ + unixodbc-dev \ + libxrender-dev \ + default-libmysqlclient-dev \ + mysql-client \ + libsm6 \ + libxext6 \ + zlib1g-dev \ + libxmlsec1-dev \ + libmediainfo-dev \ + unzip \ + libcairo2-dev \ + chromium-browser \ + software-properties-common && \ + mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ + apt-get -y autoclean && \ + apt-get -y autoremove && \ + rm -rf /var/lib/apt-get/lists/* COPY install_python.sh install_python.sh RUN bash install_python.sh ${PYTHON_VERSION_TAG} ${LINK_PYTHON_TO_PYTHON3} && \ diff --git a/install_python.sh b/install_python.sh index a4a93dc..7283023 100644 --- a/install_python.sh +++ b/install_python.sh @@ -91,7 +91,7 @@ function main() { # 1: the Python version tag # 2: bool of if should symlink python and pip to python3 versions - PYTHON_VERSION_TAG=3.9.16 + PYTHON_VERSION_TAG=3.9.18 LINK_PYTHON_TO_PYTHON3=0 # By default don't link so as to reserve python for Python 2 if [[ $# -gt 0 ]]; then PYTHON_VERSION_TAG="${1}" From 83a4c5a0730613d7216dcba50991c4659e70d085 Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Fri, 6 Oct 2023 14:23:52 -0300 Subject: [PATCH 18/24] Acertando as dependencias minimas para o docker --- Dockerfile | 57 ++++++++++++++++++++---------------------------------- 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/Dockerfile b/Dockerfile index 229ea8e..b8a0f58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,52 +15,37 @@ ARG LINK_PYTHON_TO_PYTHON3=0 # Set (temporarily) DEBIAN_FRONTEND to avoid interacting with tzdata RUN apt-get -qq -y update --fix-missing && \ DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \ - gcc \ - g++ \ - zlib1g-dev \ + build-essential \ + gdb \ + lcov \ + pkg-config \ + libbz2-dev \ + libffi-dev \ + libgdbm-dev \ + libgdbm-compat-dev \ + liblzma-dev \ + libncurses5-dev \ + libreadline6-dev \ + libsqlite3-dev \ libssl-dev \ - libbz2-dev \ - libsqlite3-dev \ - libncursesw5-dev \ - libgdbm-dev \ - libc6-dev \ - libgdbm-compat-dev \ - liblzma-dev \ - libreadline-dev \ - uuid-dev \ - libffi-dev \ - tk-dev \ + lzma \ + lzma-dev \ + tk-dev \ + uuid-dev \ + zlib1g-dev \ + unzip \ + libcairo2-dev \ + chromium-browser \ wget \ curl \ git \ - make \ sudo \ bash-completion \ tree \ vim \ - llvm \ - pkg-config \ - libavformat-dev \ - libavcodec-dev \ - libavdevice-dev \ - libavutil-dev \ - libswscale-dev \ - libswresample-dev \ - libavfilter-dev \ - xz-utils \ - libxml2 \ - unixodbc-dev \ - libxrender-dev \ default-libmysqlclient-dev \ mysql-client \ - libsm6 \ - libxext6 \ - zlib1g-dev \ - libxmlsec1-dev \ - libmediainfo-dev \ - unzip \ - libcairo2-dev \ - chromium-browser \ + libmagic1 \ software-properties-common && \ mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ apt-get -y autoclean && \ From 2e6e565720bd99461f16c573121cf6b997b9053a Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Fri, 20 Oct 2023 15:59:28 -0300 Subject: [PATCH 19/24] =?UTF-8?q?Subindo=20a=20vers=C3=A3o=20para=20python?= =?UTF-8?q?=203.10.13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 ++- Makefile | 57 ----------------------------------------------- install_python.sh | 2 +- 3 files changed, 3 insertions(+), 59 deletions(-) delete mode 100644 Makefile diff --git a/Dockerfile b/Dockerfile index b8a0f58..6de7559 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /root SHELL [ "/bin/bash", "-c" ] -ARG PYTHON_VERSION_TAG=3.9.18 +ARG PYTHON_VERSION_TAG=3.10.13 ARG LINK_PYTHON_TO_PYTHON3=0 # Existing lsb_release causes issues with modern installations of Python3 @@ -46,6 +46,7 @@ RUN apt-get -qq -y update --fix-missing && \ default-libmysqlclient-dev \ mysql-client \ libmagic1 \ + libmediainfo-dev \ software-properties-common && \ mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ apt-get -y autoclean && \ diff --git a/Makefile b/Makefile deleted file mode 100644 index 93a13b2..0000000 --- a/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -default: image - -all: image py_3.8.3 py_3.8.1 py_3.8.0 py_3.7.4 py_3.6.8 - -image: - docker build . \ - -f Dockerfile \ - --cache-from matthewfeickert/docker-python3-ubuntu:latest \ - --build-arg PYTHON_VERSION_TAG=3.8.3 \ - --build-arg LINK_PYTHON_TO_PYTHON3=1 \ - -t matthewfeickert/docker-python3-ubuntu:latest \ - -t matthewfeickert/docker-python3-ubuntu:3.8.3 \ - --compress - -py_3.8.3: - docker build . \ - -f Dockerfile \ - --cache-from matthewfeickert/docker-python3-ubuntu:latest \ - --build-arg PYTHON_VERSION_TAG=3.8.3 \ - --build-arg LINK_PYTHON_TO_PYTHON3=1 \ - -t matthewfeickert/docker-python3-ubuntu:latest \ - -t matthewfeickert/docker-python3-ubuntu:3.8.3 \ - --compress - -py_3.8.1: - docker build -f Dockerfile \ - --cache-from matthewfeickert/docker-python3-ubuntu:latest \ - --build-arg PYTHON_VERSION_TAG=3.8.1 \ - --build-arg LINK_PYTHON_TO_PYTHON3=1 \ - -t matthewfeickert/docker-python3-ubuntu:latest \ - -t matthewfeickert/docker-python3-ubuntu:3.8.1 \ - --compress . - -py_3.8.0: - docker build -f Dockerfile \ - --cache-from matthewfeickert/docker-python3-ubuntu:latest \ - --build-arg PYTHON_VERSION_TAG=3.8.0 \ - --build-arg LINK_PYTHON_TO_PYTHON3=1 \ - -t matthewfeickert/docker-python3-ubuntu:latest \ - -t matthewfeickert/docker-python3-ubuntu:3.8.0 \ - --compress . - -py_3.7.4: - docker build -f Dockerfile \ - --cache-from matthewfeickert/docker-python3-ubuntu:3.7.4 \ - --build-arg PYTHON_VERSION_TAG=3.7.4 \ - --build-arg LINK_PYTHON_TO_PYTHON3=1 \ - -t matthewfeickert/docker-python3-ubuntu:3.7.4 \ - --compress . - -py_3.6.8: - docker build -f Dockerfile \ - --cache-from matthewfeickert/docker-python3-ubuntu:3.6.8 \ - --build-arg PYTHON_VERSION_TAG=3.6.8 \ - --build-arg LINK_PYTHON_TO_PYTHON3=1 \ - -t matthewfeickert/docker-python3-ubuntu:3.6.8 \ - --compress . diff --git a/install_python.sh b/install_python.sh index 7283023..f5d31f2 100644 --- a/install_python.sh +++ b/install_python.sh @@ -91,7 +91,7 @@ function main() { # 1: the Python version tag # 2: bool of if should symlink python and pip to python3 versions - PYTHON_VERSION_TAG=3.9.18 + PYTHON_VERSION_TAG=3.10.13 LINK_PYTHON_TO_PYTHON3=0 # By default don't link so as to reserve python for Python 2 if [[ $# -gt 0 ]]; then PYTHON_VERSION_TAG="${1}" From f264797b23a40ddeca159ca4a83542cdcf8b85f4 Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Thu, 28 Mar 2024 16:32:40 -0300 Subject: [PATCH 20/24] #3582 --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 6de7559..61653f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,6 +47,9 @@ RUN apt-get -qq -y update --fix-missing && \ mysql-client \ libmagic1 \ libmediainfo-dev \ + jpegoptim \ + optipng \ + gettext \ software-properties-common && \ mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ apt-get -y autoclean && \ From 20a5301a991164ee0f72e7e7c58fe4f88c95b3cc Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Mon, 15 Jul 2024 09:58:22 -0300 Subject: [PATCH 21/24] Upgrade python 3.10.14 and compability with django geo --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 61653f5..731028f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ -FROM ubuntu:jammy +FROM ubuntu:noble -MAINTAINER Matthew Feickert +MAINTAINER Alessandro Hecht USER root WORKDIR /root SHELL [ "/bin/bash", "-c" ] -ARG PYTHON_VERSION_TAG=3.10.13 +ARG PYTHON_VERSION_TAG=3.10.14 ARG LINK_PYTHON_TO_PYTHON3=0 # Existing lsb_release causes issues with modern installations of Python3 @@ -43,6 +43,7 @@ RUN apt-get -qq -y update --fix-missing && \ bash-completion \ tree \ vim \ + gdal-bin \ default-libmysqlclient-dev \ mysql-client \ libmagic1 \ From 197e19702d5ea18c508df2ff2986991cf6e0fd61 Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Fri, 8 Nov 2024 17:03:52 -0300 Subject: [PATCH 22/24] #4526 --- Dockerfile | 102 ++++++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 48 deletions(-) diff --git a/Dockerfile b/Dockerfile index 731028f..501afe5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,38 +1,37 @@ -FROM ubuntu:noble +FROM ubuntu:24.04 -MAINTAINER Alessandro Hecht +LABEL maintainer="Alessandro Hecht " USER root WORKDIR /root SHELL [ "/bin/bash", "-c" ] -ARG PYTHON_VERSION_TAG=3.10.14 +ARG PYTHON_VERSION_TAG=3.10.15 ARG LINK_PYTHON_TO_PYTHON3=0 -# Existing lsb_release causes issues with modern installations of Python3 -# https://github.com/pypa/pip/issues/4924#issuecomment-435825490 -# Set (temporarily) DEBIAN_FRONTEND to avoid interacting with tzdata -RUN apt-get -qq -y update --fix-missing && \ - DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \ - build-essential \ - gdb \ - lcov \ - pkg-config \ - libbz2-dev \ - libffi-dev \ - libgdbm-dev \ - libgdbm-compat-dev \ - liblzma-dev \ - libncurses5-dev \ - libreadline6-dev \ - libsqlite3-dev \ +# Instalação de pacotes essenciais e dependências, remoção de pacotes desnecessários e arquivos de cache +RUN set -ex \ + && apt-get -qq -y update --fix-missing \ + && DEBIAN_FRONTEND=noninteractive apt-get -qq -y install --no-install-recommends \ + build-essential \ + gdb \ + lcov \ + pkg-config \ + libbz2-dev \ + libffi-dev \ + libgdbm-dev \ + libgdbm-compat-dev \ + liblzma-dev \ + libncurses5-dev \ + libreadline6-dev \ + libsqlite3-dev \ libssl-dev \ - lzma \ - lzma-dev \ - tk-dev \ - uuid-dev \ - zlib1g-dev \ + lzma \ + lzma-dev \ + tk-dev \ + uuid-dev \ + zlib1g-dev \ unzip \ libcairo2-dev \ chromium-browser \ @@ -51,40 +50,47 @@ RUN apt-get -qq -y update --fix-missing && \ jpegoptim \ optipng \ gettext \ - software-properties-common && \ - mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \ - apt-get -y autoclean && \ - apt-get -y autoremove && \ - rm -rf /var/lib/apt-get/lists/* + software-properties-common \ + qemu-user-static \ + binfmt-support \ + && mv /usr/bin/lsb_release /usr/bin/lsb_release.bak \ + && apt-get -y autoclean \ + && apt-get -y autoremove \ + && rm -rf /var/lib/apt/lists/* +# Configuração do binfmt_misc para suportar execução de binários x86-64 +RUN update-binfmts --enable qemu-x86_64 + +# Instalação do Python usando script customizado COPY install_python.sh install_python.sh -RUN bash install_python.sh ${PYTHON_VERSION_TAG} ${LINK_PYTHON_TO_PYTHON3} && \ - rm -r install_python.sh Python-${PYTHON_VERSION_TAG} +RUN bash install_python.sh ${PYTHON_VERSION_TAG} ${LINK_PYTHON_TO_PYTHON3} \ + && rm -rf install_python.sh Python-${PYTHON_VERSION_TAG} -# Enable tab completion by uncommenting it from /etc/bash.bashrc -# The relevant lines are those below the phrase "enable bash completion in interactive shells" -RUN export SED_RANGE="$(($(sed -n '\|enable bash completion in interactive shells|=' /etc/bash.bashrc)+1)),$(($(sed -n '\|enable bash completion in interactive shells|=' /etc/bash.bashrc)+7))" && \ - sed -i -e "${SED_RANGE}"' s/^#//' /etc/bash.bashrc && \ - unset SED_RANGE +# Habilita o bash completion +RUN export SED_RANGE="$(($(sed -n '\|enable bash completion in interactive shells|=' /etc/bash.bashrc)+1)),$(($(sed -n '\|enable bash completion in interactive shells|=' /etc/bash.bashrc)+7))" \ + && sed -i -e "${SED_RANGE}"' s/^#//' /etc/bash.bashrc \ + && unset SED_RANGE -# Create user "docker" with sudo powers -RUN useradd -m docker && \ - usermod -aG sudo docker && \ - echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \ - cp /root/.bashrc /home/docker/ && \ - mkdir /home/docker/data && \ - chown -R --from=root docker /home/docker +# Cria o usuário "docker" com permissões sudo +RUN useradd -m docker \ + && usermod -aG sudo docker \ + && echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ + && cp /root/.bashrc /home/docker/ \ + && mkdir /home/docker/data \ + && chown -R docker:docker /home/docker -# Use C.UTF-8 locale to avoid issues with ASCII encoding +# Configurações de locale ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 +# Configurações finais e preparação do ambiente do usuário "docker" WORKDIR /home/docker/data -ENV HOME /home/docker -ENV USER docker +ENV HOME=/home/docker +ENV USER=docker USER docker ENV PATH /home/docker/.local/bin:$PATH -# Avoid first use of sudo warning. c.f. https://askubuntu.com/a/22614/781671 + +# Evita o aviso de primeiro uso do sudo RUN touch $HOME/.sudo_as_admin_successful CMD [ "/bin/bash" ] From c6188206afd3189564bc791f12b6a1834bfbb5e0 Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Thu, 14 Nov 2024 11:27:03 -0300 Subject: [PATCH 23/24] #4526 --- Dockerfile | 37 +++++++++++++++++++++++++++++++------ install_python.sh | 2 -- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 501afe5..271924b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,11 @@ SHELL [ "/bin/bash", "-c" ] ARG PYTHON_VERSION_TAG=3.10.15 ARG LINK_PYTHON_TO_PYTHON3=0 +ARG TARGETPLATFORM # Instalação de pacotes essenciais e dependências, remoção de pacotes desnecessários e arquivos de cache RUN set -ex \ - && apt-get -qq -y update --fix-missing \ + && apt-get -qq -y update --fix-missing \ && DEBIAN_FRONTEND=noninteractive apt-get -qq -y install --no-install-recommends \ build-essential \ gdb \ @@ -51,15 +52,39 @@ RUN set -ex \ optipng \ gettext \ software-properties-common \ - qemu-user-static \ - binfmt-support \ && mv /usr/bin/lsb_release /usr/bin/lsb_release.bak \ && apt-get -y autoclean \ && apt-get -y autoremove \ && rm -rf /var/lib/apt/lists/* -# Configuração do binfmt_misc para suportar execução de binários x86-64 -RUN update-binfmts --enable qemu-x86_64 +# linux/arm64 - Adiciona arquitetura amd64, configura fontes e instala pacotes +RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ + dpkg --add-architecture amd64 && \ + printf "Types: deb\n\ +URIs: http://archive.ubuntu.com/ubuntu/\n\ +Suites: noble noble-updates noble-backports\n\ +Components: main universe restricted multiverse\n\ +Architectures: amd64\n\ +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n\n\ +## Ubuntu security updates. Aside from URIs and Suites,\n\ +## this should mirror your choices in the previous section.\n\ +Types: deb\n\ +URIs: http://archive.ubuntu.com/ubuntu/\n\ +Suites: noble-security\n\ +Components: main universe restricted multiverse\n\ +Architectures: amd64\n\ +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n" \ + > /etc/apt/sources.list.d/ubuntu_amd64.sources && \ + apt-get -qq -y update --fix-missing || true && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libc6:amd64 \ + libstdc++6:amd64 \ + zlib1g:amd64 \ + libglib2.0-0:amd64 \ + libnss3:amd64 \ + libx11-6:amd64 && \ + rm -rf /var/lib/apt/lists/*; \ + fi # Instalação do Python usando script customizado COPY install_python.sh install_python.sh @@ -88,7 +113,7 @@ WORKDIR /home/docker/data ENV HOME=/home/docker ENV USER=docker USER docker -ENV PATH /home/docker/.local/bin:$PATH +ENV PATH=/home/docker/.local/bin:$PATH # Evita o aviso de primeiro uso do sudo RUN touch $HOME/.sudo_as_admin_successful diff --git a/install_python.sh b/install_python.sh index f5d31f2..27c16d2 100644 --- a/install_python.sh +++ b/install_python.sh @@ -46,8 +46,6 @@ function build_cpython () { printf "\n### make -j%s\n" "${NPROC}" make -j"${NPROC}" - printf "\n### make -j%s test\n" "${NPROC}" - make -j"${NPROC}" test printf "\n### make install\n" make install } From 0ece3c20f53db6546fe8ee9747e629894d2663be Mon Sep 17 00:00:00 2001 From: Alessandro Hecht Date: Wed, 4 Dec 2024 16:15:24 -0300 Subject: [PATCH 24/24] Atualizando para incluir o ffmpeg --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 271924b..ee49672 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /root SHELL [ "/bin/bash", "-c" ] -ARG PYTHON_VERSION_TAG=3.10.15 +ARG PYTHON_VERSION_TAG=3.10.16 ARG LINK_PYTHON_TO_PYTHON3=0 ARG TARGETPLATFORM @@ -18,6 +18,7 @@ RUN set -ex \ build-essential \ gdb \ lcov \ + yasm \ pkg-config \ libbz2-dev \ libffi-dev \ @@ -52,6 +53,7 @@ RUN set -ex \ optipng \ gettext \ software-properties-common \ + ffmpeg \ && mv /usr/bin/lsb_release /usr/bin/lsb_release.bak \ && apt-get -y autoclean \ && apt-get -y autoremove \