diff --git a/.github/workflows/build-ubuntu-22.04-risc.yml b/.github/workflows/build-ubuntu-22.04-risc.yml index d38776e..45e9abe 100644 --- a/.github/workflows/build-ubuntu-22.04-risc.yml +++ b/.github/workflows/build-ubuntu-22.04-risc.yml @@ -24,6 +24,7 @@ jobs: build: uses: Chia-Network/actions/.github/workflows/docker-build.yaml@main with: + enable-qemu-cache: false alternate-latest-mode: true runs-on: k8s-public timeout-minutes: 240 diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 94dc960..edb9151 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.16.2 +FROM alpine:3.21 WORKDIR /root # Set environment variables for rust and pyenv @@ -7,8 +7,7 @@ ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" ENV PATH="/root/.cargo/bin:${PATH}" ENV RUST_BACKTRACE=1 -RUN sh -c "echo https://mirrors.edge.kernel.org/alpine/v3.16.2/community >> /etc/apk/repositories" -RUN apk add bash git curl python3 openssl openssl-dev perl linux-headers make gcc musl-dev patch patchelf +RUN apk add bash git curl python3 openssl openssl-dev perl linux-headers make gcc musl-dev patch patchelf py3-pip # Additional pyenv dependencies RUN apk add --no-cache build-base libffi-dev bzip2-dev zlib-dev xz-dev readline-dev sqlite-dev tk-dev @@ -16,12 +15,7 @@ RUN apk add --no-cache build-base libffi-dev bzip2-dev zlib-dev xz-dev readline- RUN curl --proto '=https' --tlsv1.2 -sSf -o rustup https://sh.rustup.rs RUN sh ./rustup -y -# Build a copy of openssl - needed for the rust-openssl crate -COPY build-openssl.sh . -RUN sh ./build-openssl.sh - RUN curl https://pyenv.run | bash && \ - PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.8 && \ PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.9 && \ PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.10 && \ PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.11 && \ diff --git a/alpine/build-openssl.sh b/alpine/build-openssl.sh deleted file mode 100755 index 5ccce72..0000000 --- a/alpine/build-openssl.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/x86_64-linux-musl/asm -ln -s /usr/include/asm-generic /usr/include/x86_64-linux-musl/asm-generic -ln -s /usr/include/linux /usr/include/x86_64-linux-musl/linux - -mkdir /musl - -wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1w.tar.gz -tar zxvf OpenSSL_1_1_1w.tar.gz -cd openssl-OpenSSL_1_1_1w/ || exit - -CC="/usr/bin/x86_64-alpine-linux-musl-gcc -static" ./Configure no-shared no-async --prefix=/musl --openssldir=/musl/ssl linux-x86_64 -make depend -make -j"$(nproc)" -make install diff --git a/rocky8/Dockerfile b/rocky8/Dockerfile index c398f27..27243b1 100644 --- a/rocky8/Dockerfile +++ b/rocky8/Dockerfile @@ -17,25 +17,39 @@ 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* +# Compile newer version of openssl \ +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 && \ +RUN yum -y install zlib-devel bzip2 bzip2-devel readline-devel tk-devel libffi-devel xz-devel && \ cd ~ && \ # Set up pyenv \ + export PYTHON_CONFIGURE_OPTS="--with-openssl=/usr/local/ssl --with-openssl-rpath=auto --enable-shared --enable-optimizations" && \ git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \ - pyenv install 3.10 && \ - pyenv global 3.10 && \ + pyenv install 3.11 --verbose && \ + 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.40.1")' && \ + 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..cf67085 100644 --- a/ubuntu-20.04/Dockerfile +++ b/ubuntu-20.04/Dockerfile @@ -42,27 +42,42 @@ RUN apt-get update && \ vim \ wget \ xz-utils \ - zlib1g-dev && \ + zlib1g-dev \ + checkinstall && \ rm -rf /var/lib/apt/lists/* # 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 && \ - pyenv global 3.10 && \ + export PYTHON_CONFIGURE_OPTS="--with-openssl=/usr/local/ssl --with-openssl-rpath=auto --enable-shared --enable-optimizations" && \ + pyenv install 3.11 --verbose && \ + 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.40.1")' + 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 80906f5..4b7128a 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://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 && \ @@ -46,16 +46,14 @@ ARG PYTHON_CONFIGURE_OPTS="--enable-shared" ARG LDFLAGS="-Wl,-rpath,/opt/sqlite3/lib -L/opt/sqlite3/lib -lsqlite3" ARG CPPFLAGS="-I/opt/sqlite3/include" -RUN pyenv install 3.8 RUN pyenv install 3.9 RUN pyenv install 3.10 RUN pyenv install 3.11 RUN pyenv install 3.12 -RUN pyenv global 3.12 3.11 3.10 3.9 3.8 +RUN pyenv global 3.12 3.11 3.10 3.9 # make sure sqlite is loaded from the expected path -RUN ldd $(python3.8 -c 'import _sqlite3; print(_sqlite3.__file__)') | grep /opt/sqlite3/lib/ RUN ldd $(python3.9 -c 'import _sqlite3; print(_sqlite3.__file__)') | grep /opt/sqlite3/lib/ RUN ldd $(python3.10 -c 'import _sqlite3; print(_sqlite3.__file__)') | grep /opt/sqlite3/lib/ RUN ldd $(python3.11 -c 'import _sqlite3; print(_sqlite3.__file__)') | grep /opt/sqlite3/lib/ diff --git a/ubuntu-22.04/Dockerfile b/ubuntu-22.04/Dockerfile index 5a042a1..92ab1c2 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://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,12 @@ RUN cd ~ && \ # Set up pyenv RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \ - pyenv install 3.10 && \ - pyenv global 3.10 && \ + export PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" && \ + pyenv install 3.11 --verbose && \ + 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.40.1")' + python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' # Add nodejs ENV NODE_MAJOR=18