~/talk

How to containerize Python applications with Docker

Talkat Docker Community All Hands #5 (March 2022) · 2022-03-31..04-01· [python]
links:none on file
slides:none on file

Step-by-step show of containerizing a simple Python script and a FastAPI web app using python:3.9 base image, building Dockerfiles that add source, run `pip install` and set CMD, and a second Dockerfile that uses a working dir, `pip freeze` -> requirements.txt and pip install --no-cache-dir. Demonstrates interactive input with `docker run -it`, exposes the server with --host 0.0.0.0 and maps ports, then runs detached with docker run -p 80:80 -d and successfully execs into the container to inspect files.

AI-written summary · about

  1. 0:00Start
  2. 0:56About Me
  3. 1:36About Docker
  4. 2:34Install the Official Docker Extension
  5. 4:27Create a Docker File
  6. 4:48Docker File
  7. 5:26Creating the Image
  8. 7:11Install the Third Party Libraries
  9. 8:27The Docker Build Command
  10. 12:03Create a Simple Web App
  11. 12:32Virtual Environment
  12. 19:05Use a Docker Ignore File
  13. 24:24A Terminal inside the Container
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.