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