Skip to content

Instantly share code, notes, and snippets.

@wizardbeard
Last active November 7, 2023 08:22
Show Gist options
  • Save wizardbeard/d5b641d1fadbaba755823e16eab4dda1 to your computer and use it in GitHub Desktop.
Save wizardbeard/d5b641d1fadbaba755823e16eab4dda1 to your computer and use it in GitHub Desktop.
Build OpenSSL on python:3.9-slim
FROM python:3.9-slim as builder
RUN apt-get update -y && apt-get install -y --no-install-recommends wget make build-essential libssl-dev zlib1g zlib1g-dev
RUN mkdir -p /tmp/python
WORKDIR /tmp/python
RUN wget https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tar.xz
RUN ls -halt
RUN tar -xf Python-3.9.10.tar.xz
WORKDIR /tmp/python/Python-3.9.10
RUN ./configure --with-openssl=/usr/include/openssl --enable-optimizations
RUN make -j$(nproc)
RUN make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment