From 04580323289f594a1beb60bbf8c4c7d49566a25e Mon Sep 17 00:00:00 2001 From: Earle Lowe Date: Wed, 15 Jan 2025 13:26:53 -0800 Subject: [PATCH 1/5] Add 3.11 to images with newer openssl as needed - also update sqlite --- rocky8/Dockerfile | 29 ++++++++++++++++++++++++----- ubuntu-20.04/Dockerfile | 28 +++++++++++++++++++++++----- ubuntu-22.04-risc/Dockerfile | 8 ++++---- ubuntu-22.04/Dockerfile | 15 +++++++++++---- 4 files changed, 62 insertions(+), 18 deletions(-) diff --git a/rocky8/Dockerfile b/rocky8/Dockerfile index c398f27..fb25c8a 100644 --- a/rocky8/Dockerfile +++ b/rocky8/Dockerfile @@ -17,25 +17,44 @@ RUN yum -y groupinstall "Development Tools" && \ # Compile newer version of sqlite3 RUN cd ~ && \ - wget -q https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \ - tar -xzf sqlite-autoconf-3400100.tar.gz && \ - cd sqlite-autoconf-3400100 && \ + wget -q https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz && \ + tar -xzf sqlite-autoconf-3450100.tar.gz && \ + cd sqlite-autoconf-3450100 && \ CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/usr/sqlite3 && \ make && \ make install && \ cd ~ && \ rm -rf ~/sqlite-autoconf* +RUN cd ~ && \ + yum -y install perl-IPC-Cmd perl-Pod-Html && \ + wget -q https://github.com/openssl/openssl/releases/download/openssl-3.0.15/openssl-3.0.15.tar.gz && \ + tar -xzf openssl-3.0.15.tar.gz && \ + cd openssl-3.0.15 && \ + ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl --libdir=lib no-ssl3 no-idea no-dtls no-srp no-comp shared && \ + make && \ + make install && \ + cd ~ && \ + rm -rf ~/openssl-3.0.15* + # Compile newer version of python3 RUN yum -y install openssl openssl-devel zlib-devel bzip2 bzip2-devel readline-devel tk-devel libffi-devel xz-devel && \ cd ~ && \ # Set up pyenv \ git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \ - pyenv install 3.10 && \ + # setup python 3.10 \ + PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install 3.10 && \ + # setup python 3.11 w/ openssl 3 \ + PYTHON_CONFIGURE_OPTS="--with-openssl=/usr/local/ssl --with-openssl-rpath=auto --enable-shared --enable-optimizations" pyenv install 3.11 && \ pyenv global 3.10 && \ pip install --upgrade pip && \ pip install --no-cache-dir py3createtorrent awscli && \ - python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")' && \ + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \ + pyenv global 3.11 && \ + pip install --upgrade pip && \ + pip install --no-cache-dir py3createtorrent awscli && \ + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \ + python3 -c 'import sys; import ssl; sys.exit(ssl.OPENSSL_VERSION_INFO != (3,0,0,15,0))' && \ yum clean all # Add nodejs diff --git a/ubuntu-20.04/Dockerfile b/ubuntu-20.04/Dockerfile index 3c809ec..771d95d 100644 --- a/ubuntu-20.04/Dockerfile +++ b/ubuntu-20.04/Dockerfile @@ -47,22 +47,40 @@ RUN apt-get update && \ # Compile newer version of sqlite3 \ RUN cd ~ && \ - wget -q https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \ - tar -xzf sqlite-autoconf-3400100.tar.gz && \ - cd sqlite-autoconf-3400100 && \ + wget -q https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz && \ + tar -xzf sqlite-autoconf-3450100.tar.gz && \ + cd sqlite-autoconf-3450100 && \ CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/usr && \ make && \ make install && \ cd ~ && \ rm -rf ~/sqlite-autoconf* +# Compile newer version of openssl \ +RUN cd ~ && \ + wget -q https://github.com/openssl/openssl/releases/download/openssl-3.0.15/openssl-3.0.15.tar.gz && \ + tar -xzf openssl-3.0.15.tar.gz && \ + cd openssl-3.0.15 && \ + ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl --libdir=lib no-ssl3 no-idea no-dtls no-srp no-comp shared && \ + make && \ + make install && \ + cd ~ && \ + rm -rf ~/openssl-3.0.15* + # Set up pyenv \ RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \ - pyenv install 3.10 && \ + PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install 3.10 && \ + PYTHON_CONFIGURE_OPTS="--with-openssl=/usr/local/ssl --with-openssl-rpath=auto --enable-shared --enable-optimizations" pyenv install 3.11 && \ pyenv global 3.10 && \ pip install --upgrade pip && \ pip install --no-cache-dir py3createtorrent && \ - python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")' + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \ + pyenv global 3.11 && \ + pip install --upgrade pip && \ + pip install --no-cache-dir py3createtorrent awscli && \ + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \ + python3 -c 'import sys; import ssl; sys.exit(ssl.OPENSSL_VERSION_INFO != (3,0,0,15,0))' && \ + # Add nodejs ENV NODE_MAJOR=18 diff --git a/ubuntu-22.04-risc/Dockerfile b/ubuntu-22.04-risc/Dockerfile index 624104f..4f9f06c 100644 --- a/ubuntu-22.04-risc/Dockerfile +++ b/ubuntu-22.04-risc/Dockerfile @@ -18,9 +18,9 @@ RUN curl -L -O https://ftpmirror.gnu.org/gnu/binutils/binutils-2.38.tar.gz && \ FROM base AS sqlite -RUN curl -L -O https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \ - tar -xvzf sqlite-autoconf-3400100.tar.gz && \ - cd sqlite-autoconf-3400100 && \ +RUN curl -L -O https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz && \ + tar -xvzf sqlite-autoconf-3450100.tar.gz && \ + cd sqlite-autoconf-3450100 && \ CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/opt/sqlite3 && \ make && \ make install && \ @@ -42,7 +42,7 @@ ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" RUN curl https://pyenv.run | bash -ARG PYTHON_CONFIGURE_OPTS="--enable-shared" +ARG PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" ARG LDFLAGS="-Wl,-rpath,/opt/sqlite3/lib -L/opt/sqlite3/lib -lsqlite3" ARG CPPFLAGS="-I/opt/sqlite3/include" diff --git a/ubuntu-22.04/Dockerfile b/ubuntu-22.04/Dockerfile index 5a042a1..c7b3383 100644 --- a/ubuntu-22.04/Dockerfile +++ b/ubuntu-22.04/Dockerfile @@ -47,9 +47,9 @@ RUN apt-get update && \ # Compile newer version of sqlite3 \ RUN cd ~ && \ - wget -q https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \ - tar -xzf sqlite-autoconf-3400100.tar.gz && \ - cd sqlite-autoconf-3400100 && \ + wget -q https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz && \ + tar -xzf sqlite-autoconf-3450100.tar.gz && \ + cd sqlite-autoconf-3450100 && \ CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/usr && \ make && \ make install && \ @@ -58,11 +58,18 @@ RUN cd ~ && \ # Set up pyenv RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \ + export PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" && \ pyenv install 3.10 && \ + pyenv install 3.11 && \ pyenv global 3.10 && \ pip install --upgrade pip && \ pip install --no-cache-dir py3createtorrent && \ - python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")' + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \ + pyenv global 3.11 && \ + pip install --upgrade pip && \ + pip install --no-cache-dir py3createtorrent && \ + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' + # Add nodejs ENV NODE_MAJOR=18 From 3d6839fa52b03ac6107f9dd415676d7b2fa8214f Mon Sep 17 00:00:00 2001 From: Earle Lowe <30607889+emlowe@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:01:03 -0800 Subject: [PATCH 2/5] Update Dockerfile --- ubuntu-20.04/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu-20.04/Dockerfile b/ubuntu-20.04/Dockerfile index 771d95d..f83c539 100644 --- a/ubuntu-20.04/Dockerfile +++ b/ubuntu-20.04/Dockerfile @@ -79,7 +79,7 @@ RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \ pip install --upgrade pip && \ pip install --no-cache-dir py3createtorrent awscli && \ python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \ - python3 -c 'import sys; import ssl; sys.exit(ssl.OPENSSL_VERSION_INFO != (3,0,0,15,0))' && \ + python3 -c 'import sys; import ssl; sys.exit(ssl.OPENSSL_VERSION_INFO != (3,0,0,15,0))' # Add nodejs From a14b2f8e3a81240dc75261033f69398d7226a8de Mon Sep 17 00:00:00 2001 From: Earle Lowe <30607889+emlowe@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:35:26 -0800 Subject: [PATCH 3/5] Update Dockerfile --- ubuntu-22.04-risc/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ubuntu-22.04-risc/Dockerfile b/ubuntu-22.04-risc/Dockerfile index 4f9f06c..5658049 100644 --- a/ubuntu-22.04-risc/Dockerfile +++ b/ubuntu-22.04-risc/Dockerfile @@ -50,7 +50,8 @@ RUN pyenv install 3.9 RUN pyenv install 3.10 RUN pyenv install 3.11 RUN pyenv install 3.12 -RUN pyenv install 3.13 +# enable-optimizations seems to cause compiler error and crash +RUN PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.13 RUN pyenv global 3.13 3.12 3.11 3.10 3.9 From ca45283d48ae7c741b8adb7c162ad779a7d2af2d Mon Sep 17 00:00:00 2001 From: Earle Lowe Date: Tue, 11 Feb 2025 13:20:55 -0800 Subject: [PATCH 4/5] Simplify PR --- rocky8/Dockerfile | 14 ++++++-------- ubuntu-20.04/Dockerfile | 16 +++++++--------- ubuntu-22.04-risc/Dockerfile | 8 ++++---- ubuntu-22.04/Dockerfile | 15 ++++++--------- 4 files changed, 23 insertions(+), 30 deletions(-) diff --git a/rocky8/Dockerfile b/rocky8/Dockerfile index fb25c8a..1a30c28 100644 --- a/rocky8/Dockerfile +++ b/rocky8/Dockerfile @@ -17,9 +17,9 @@ RUN yum -y groupinstall "Development Tools" && \ # Compile newer version of sqlite3 RUN cd ~ && \ - wget -q https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz && \ - tar -xzf sqlite-autoconf-3450100.tar.gz && \ - cd sqlite-autoconf-3450100 && \ + wget -q https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \ + tar -xzf sqlite-autoconf-3400100.tar.gz && \ + cd sqlite-autoconf-3400100 && \ CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/usr/sqlite3 && \ make && \ make install && \ @@ -43,17 +43,15 @@ RUN yum -y install openssl openssl-devel zlib-devel bzip2 bzip2-devel readline-d # Set up pyenv \ git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \ # setup python 3.10 \ - PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install 3.10 && \ + pyenv install 3.10 && \ # setup python 3.11 w/ openssl 3 \ PYTHON_CONFIGURE_OPTS="--with-openssl=/usr/local/ssl --with-openssl-rpath=auto --enable-shared --enable-optimizations" pyenv install 3.11 && \ pyenv global 3.10 && \ pip install --upgrade pip && \ pip install --no-cache-dir py3createtorrent awscli && \ - python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \ + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")' && \ pyenv global 3.11 && \ - pip install --upgrade pip && \ - pip install --no-cache-dir py3createtorrent awscli && \ - python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \ + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")' && \ python3 -c 'import sys; import ssl; sys.exit(ssl.OPENSSL_VERSION_INFO != (3,0,0,15,0))' && \ yum clean all diff --git a/ubuntu-20.04/Dockerfile b/ubuntu-20.04/Dockerfile index f83c539..d10aaf0 100644 --- a/ubuntu-20.04/Dockerfile +++ b/ubuntu-20.04/Dockerfile @@ -47,9 +47,9 @@ RUN apt-get update && \ # Compile newer version of sqlite3 \ RUN cd ~ && \ - wget -q https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz && \ - tar -xzf sqlite-autoconf-3450100.tar.gz && \ - cd sqlite-autoconf-3450100 && \ + wget -q https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \ + tar -xzf sqlite-autoconf-3400100.tar.gz && \ + cd sqlite-autoconf-3400100 && \ CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/usr && \ make && \ make install && \ @@ -67,18 +67,16 @@ RUN cd ~ && \ cd ~ && \ rm -rf ~/openssl-3.0.15* -# Set up pyenv \ +# Set up pyenv RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \ - PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install 3.10 && \ + pyenv install 3.10 && \ PYTHON_CONFIGURE_OPTS="--with-openssl=/usr/local/ssl --with-openssl-rpath=auto --enable-shared --enable-optimizations" pyenv install 3.11 && \ pyenv global 3.10 && \ pip install --upgrade pip && \ pip install --no-cache-dir py3createtorrent && \ - python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \ + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")' && \ pyenv global 3.11 && \ - pip install --upgrade pip && \ - pip install --no-cache-dir py3createtorrent awscli && \ - python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \ + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")' && \ python3 -c 'import sys; import ssl; sys.exit(ssl.OPENSSL_VERSION_INFO != (3,0,0,15,0))' diff --git a/ubuntu-22.04-risc/Dockerfile b/ubuntu-22.04-risc/Dockerfile index 5658049..f1788eb 100644 --- a/ubuntu-22.04-risc/Dockerfile +++ b/ubuntu-22.04-risc/Dockerfile @@ -18,9 +18,9 @@ RUN curl -L -O https://ftpmirror.gnu.org/gnu/binutils/binutils-2.38.tar.gz && \ FROM base AS sqlite -RUN curl -L -O https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz && \ - tar -xvzf sqlite-autoconf-3450100.tar.gz && \ - cd sqlite-autoconf-3450100 && \ +RUN curl -L -O https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \ + tar -xvzf sqlite-autoconf-3400100.tar.gz && \ + cd sqlite-autoconf-3400100 && \ CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/opt/sqlite3 && \ make && \ make install && \ @@ -42,7 +42,7 @@ ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" RUN curl https://pyenv.run | bash -ARG PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" +ARG PYTHON_CONFIGURE_OPTS="--enable-shared" ARG LDFLAGS="-Wl,-rpath,/opt/sqlite3/lib -L/opt/sqlite3/lib -lsqlite3" ARG CPPFLAGS="-I/opt/sqlite3/include" diff --git a/ubuntu-22.04/Dockerfile b/ubuntu-22.04/Dockerfile index c7b3383..c067c69 100644 --- a/ubuntu-22.04/Dockerfile +++ b/ubuntu-22.04/Dockerfile @@ -47,9 +47,9 @@ RUN apt-get update && \ # Compile newer version of sqlite3 \ RUN cd ~ && \ - wget -q https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz && \ - tar -xzf sqlite-autoconf-3450100.tar.gz && \ - cd sqlite-autoconf-3450100 && \ + wget -q https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \ + tar -xzf sqlite-autoconf-3400100.tar.gz && \ + cd sqlite-autoconf-3400100 && \ CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/usr && \ make && \ make install && \ @@ -58,17 +58,14 @@ RUN cd ~ && \ # Set up pyenv RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \ - export PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" && \ pyenv install 3.10 && \ - pyenv install 3.11 && \ + PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install 3.11 && \ pyenv global 3.10 && \ pip install --upgrade pip && \ pip install --no-cache-dir py3createtorrent && \ - python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \ + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")' && \ pyenv global 3.11 && \ - pip install --upgrade pip && \ - pip install --no-cache-dir py3createtorrent && \ - python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")' # Add nodejs From ba1232d4bf5c31064a75a3eca3eb84612cbee3ee Mon Sep 17 00:00:00 2001 From: Earle Lowe Date: Tue, 11 Feb 2025 13:22:04 -0800 Subject: [PATCH 5/5] undo changes to risc image --- ubuntu-22.04-risc/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ubuntu-22.04-risc/Dockerfile b/ubuntu-22.04-risc/Dockerfile index f1788eb..624104f 100644 --- a/ubuntu-22.04-risc/Dockerfile +++ b/ubuntu-22.04-risc/Dockerfile @@ -50,8 +50,7 @@ RUN pyenv install 3.9 RUN pyenv install 3.10 RUN pyenv install 3.11 RUN pyenv install 3.12 -# enable-optimizations seems to cause compiler error and crash -RUN PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.13 +RUN pyenv install 3.13 RUN pyenv global 3.13 3.12 3.11 3.10 3.9