Docker Python Tutorial #2: First Docker Container

Published: 13 July 2021
on channel: Red Eyed Coder Club
3,431
75

This "Docker Python Tutorial #2: First Container" video is about how to download a Docker image (or Docker container) from Docker hub, how to run Docker Container, and how to forward ports - how to match port on your local machine to a port inside a Docker container.

It's the second video from a small series about Docker for Python and Data Science.


Follow me @:
Telegram: https://t.me/red_eyed_coder_club
Twitter:   / codereyed  
Facebook: https://fb.me/redeyedcoderclub


In this video I download a Docker Container from hub.docker.com
with 'docker pull' command.

To look at all downloaded Docker images use:

docker images

To run a Docker Container use:

docker run name_of_docker_container

The container will run, and the Flask app will also run inside the Docker Container. To get it working on your host machine we have to forward ports of the app.

docker run -p 5000:5000 name_of_docker_container

The first port is the port, that you want to use on your host machine.
The second port is the port of the app, that used inside the Docker Container.


Red Eyed Coder Club (RED) channels is the best place to learn Python programming:
   / @redeyedcoderclub  


#docker #dockertutorial #dockerpython #redeyedcoderclub

✴️✴️✴️ Docker for Python and Data Science Playlist ✴️✴️✴️

1. Docker installation on Ubuntu based Distro:
   • Docker Python Tutorial #1: How to ins...  

2. How to use Docker containers:
   • Docker Python Tutorial #2: First Dock...  

3. How to copy file to a Docker container:
   • Docker Python Tutorial #3: Copying fi...  

4. How to use Docker volumes:
   • Docker Python Tutorial #4: Docker Vol...  

5. Dockerfile: How to install Python libraries into container:
   • Docker Python Tutorial #5: Installing...  

6. How to use Docker Compose:
   • Docker Python Tutorial #6: Docker Com...