Python in Containers Course Materials
Section 3. „Building Custom Python Images”
Links:
https://github.com/pythonincontainers/buildcustom
Commands:
$ git clone https://github.com/pythonincontainers/buildcustom
$ cd buildcustom
$ atom .
$ docker build -t cython:3.7.3-full -f Dockerfile.cython0.28.5-
full .
$ docker run -it --rm -v ${PWD}:/app -w /app cython:3.7.3-full
$ docker build -t flask:1.0.3-slim -f Dockerfile.flask1.0.3-slim
.
$ docker run -it --rm -p 5000:5000 -v ${PWD}:/app -w /app -e
FLASK_APP=factors_flask.py flask:1.0.3-slim
$ docker build -t factors_flask:cython-flask-slim -f
Dockerfile.cython-flask-slim .
$ docker run -it --rm -p 5000:5000 factors_flask:cython-flask-
slim
© Krzysztof Celmer, 2019 Copying or distribution without permission not allowed