Python 3 & Emacs in Docker

1. Create a dockerfile, e.g., mydockerfile with the following content:

FROM alpine:3.7

Maintainer myhlow

RUN apk upgrade –update && apk add python3 python3-dev gcc gfortran freetype-dev musl-dev libpng-dev g++ lapack-dev emacs
RUN pip3 install –upgrade pip
RUN pip3 install virtualenv
RUN pip3 install numpy scipy pandas scikit-learn

2. Build a local Python 3 with Emacs docker image in the same folder as the dockerfile:

docker build -t python_docker_base -f mydockerfile .

3. Run the docker image:

docker run -it python_docker_base:latest