Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Base Docker image for ubuntu-16.04 & Python3.6
# docker build -t ubuntu1604py36
FROM ubuntu:16.04
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv
RUN apt-get install -y git
# update pip
RUN python3.6 -m pip install pip --upgrade
RUN python3.6 -m pip install wheel
@b0g3r

This comment has been minimized.

Copy link

commented May 11, 2018

vim? why?

@xBartu

This comment has been minimized.

Copy link

commented May 13, 2018

@b0g3r you do not need many of the settings here. Basically, you can ignore vim, git etc. Even pip you may not need.

@sergsoares

This comment has been minimized.

Copy link

commented May 17, 2018

Thanks, help me try to get out docker compose to learn more about docker, using a simple Dockerfile to resolve.

@shaoeChen

This comment has been minimized.

Copy link

commented Sep 4, 2018

thanks, it really very very base docker image for python 3.6 !

@vrishaligiri

This comment has been minimized.

Copy link

commented Sep 21, 2018

RUN add-apt-repository ppa:jonathonf/python-3.6
 ---> Running in f7ecf56ba324
Cannot add PPA: 'ppa:~jonathonf/ubuntu/python-3.6'.
ERROR: '~jonathonf' user or team does not exist.
The command '/bin/sh -c add-apt-repository ppa:jonathonf/python-3.6' returned a non-zero code: 1
@adammenges

This comment has been minimized.

Copy link

commented Oct 2, 2018

cheers

@AlekKras

This comment has been minimized.

Copy link

commented Oct 23, 2018

Slightly modified and better working Dockerfile would be as follow:


# docker build -t ubuntu1604py36
FROM ubuntu:16.04

RUN apt-get update && \
        apt-get install -y software-properties-common vim
        add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update -y

RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv && \
        apt-get install -y git

# update pip
RUN python3.6 -m pip install pip --upgrade && \
        python3.6 -m pip install wheel
@desprit

This comment has been minimized.

Copy link

commented Jan 7, 2019

RUN apt-get update &&
apt-get install -y software-properties-common vim
add-apt-repository ppa:jonathonf/python-3.6

Should be

RUN apt-get update && \
  apt-get install -y software-properties-common vim && \
  add-apt-repository ppa:jonathonf/python-3.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.