Skip to content

Latest commit

 

History

History
 
 

example1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

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