Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installing Python in Docker

This is a simple Ununtu-based Docker image into which we have installed python3. We build it, we run it in interactive mode and then inside we can run python3.

FROM ubuntu:20.04
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y python3
$ docker build -t mydocker1 .
$ docker run --rm -it mydocker1
# which python3