Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 573 Bytes

README.md

File metadata and controls

29 lines (19 loc) · 573 Bytes

Dockerize a simple Python script with third-party modules

We differ between:

  • Dockerfile: Blueprint for building images
  • Image: Template for running containers
  • Container: Running process with the packaged project

1. Build the Docker image

$ docker build -t python-imdb . 

2. Run the Docker image (starts the container)

Without user input:

$ docker run python-imdb

If you want user input (comment out the break in main.py):

$ docker run -t -i python-imdb

-i: interactive, -t: pseudo terminal