Skip to content

Commit

Permalink
Revert "Update sqlite and ssl (#90)" (#92)
Browse files Browse the repository at this point in the history
* Revert "Update sqlite and ssl (#90)"

This reverts commit 5bfe33c.

* Update build-ubuntu-22.04-risc.yml

* Update Dockerfile (remove 3.8)
  • Loading branch information
emlowe authored Jan 14, 2025
1 parent d79f61f commit fe5c8a3
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 55 deletions.
10 changes: 8 additions & 2 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.21
FROM alpine:3.16.2
WORKDIR /root

# Set environment variables for rust and pyenv
Expand All @@ -7,15 +7,21 @@ ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"
ENV PATH="/root/.cargo/bin:${PATH}"
ENV RUST_BACKTRACE=1

RUN apk add bash git curl python3 openssl openssl-dev perl linux-headers make gcc musl-dev patch patchelf py3-pip
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
# Additional pyenv dependencies
RUN apk add --no-cache build-base libffi-dev bzip2-dev zlib-dev xz-dev readline-dev sqlite-dev tk-dev

# Install Rust
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 && \
Expand Down
16 changes: 16 additions & 0 deletions alpine/build-openssl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/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
28 changes: 7 additions & 21 deletions rocky8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,25 @@ 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 && \
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 zlib-devel bzip2 bzip2-devel readline-devel tk-devel libffi-devel xz-devel && \
RUN yum -y install openssl openssl-devel 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.11 --verbose && \
pyenv global 3.11 && \
pyenv install 3.10 && \
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 ssl; sys.exit(ssl.OPENSSL_VERSION_INFO != (3,0,0,15,0))' && \
python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")' && \
yum clean all

# Add nodejs
Expand Down
29 changes: 7 additions & 22 deletions ubuntu-20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,42 +42,27 @@ RUN apt-get update && \
vim \
wget \
xz-utils \
zlib1g-dev \
checkinstall && \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*

# 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 && \
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 && \
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 && \
pyenv install 3.10 && \
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 ssl; sys.exit(ssl.OPENSSL_VERSION_INFO != (3,0,0,15,0))'

python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")'

# Add nodejs
ENV NODE_MAJOR=18
Expand Down
6 changes: 3 additions & 3 deletions ubuntu-22.04-risc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/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 && \
Expand Down
13 changes: 6 additions & 7 deletions ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ RUN apt-get update && \

# Compile newer version of sqlite3 \
RUN cd ~ && \
wget -q https://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 && \
Expand All @@ -58,12 +58,11 @@ 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.11 --verbose && \
pyenv global 3.11 && \
pyenv install 3.10 && \
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")'

# Add nodejs
ENV NODE_MAJOR=18
Expand Down

0 comments on commit fe5c8a3

Please sign in to comment.