Last active
March 1, 2020 10:29
-
-
Save aleksandr-kotlyar/c4267db23b4d13f1d4c615f0f09c3485 to your computer and use it in GitHub Desktop.
ubuntu:18.04 + python 3.7.6 installed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
# Set Time Zone | |
ENV pyversion=3.7.6 \ | |
TZ=Europe/Moscow | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
# install python | |
# Prepare system | |
RUN apt-get update \ | |
&& apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Download source code and Build Python | |
RUN wget https://www.python.org/ftp/python/${pyversion}/Python-${pyversion}.tgz \ | |
&& tar xzvf Python-${pyversion}.tgz \ | |
&& cd Python-${pyversion} \ | |
&& ./configure --enable-optimizations --with-ensurepip=install \ | |
&& make -j 8 \ | |
&& sudo make altinstall |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment