Skip to content

Instantly share code, notes, and snippets.

@userimack
Created December 21, 2020 15:36
Show Gist options
  • Save userimack/4628f072fce5b49d8f29d31e9a11b906 to your computer and use it in GitHub Desktop.
Save userimack/4628f072fce5b49d8f29d31e9a11b906 to your computer and use it in GitHub Desktop.
Dockerfile suse/tumbleweed with Python 3.6.7 installed
from opensuse/tumbleweed:latest
LABEL maintainer="Mahendra"
RUN zypper --non-interactive --quiet install --type pattern devel_C_C++
RUN zypper --non-interactive --quiet install libopenssl-devel libffi-devel bluez-devel tk-devel valgrind-devel libexpat-devel sqlite3-devel readline-devel readline-devel-32bit libbz2-devel libexpat-devel libbz2-devel readline-devel sqlite3-devel wget patterns-devel-python-devel_python3 tar gcc make
ENV VERSION="3.6.7"
RUN wget -P /usr/src https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tar.xz && tar -xf /usr/src/Python-${VERSION}.tar.xz -C /usr/src/ && rm -rf /usr/src/Python-${VERSION}.tar.xz
WORKDIR /usr/src/Python-${VERSION}
RUN pwd && ls
RUN CXX=/usr/bin/g++ ./configure --prefix=/usr --enable-shared --with-system-expat --with-system-ffi
RUN make --quiet
RUN make --quiet install
RUN chmod -v 755 /usr/lib/libpython3.6m.so && chmod -v 755 /usr/lib/libpython3.so
ENV LD_LIBRARY_PATH=":/usr/lib/"
WORKDIR /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment