Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Building and Running | Quick Start
Docker for Python Developers
course content

Conteúdo do Curso

Docker for Python Developers

Docker for Python Developers

1. Key Docker Concepts
2. Quick Start
3. Docker for Flask
4. Advanced Concepts

book
Building and Running

The docker build command allows creating Docker images from a Dockerfile, which defines the image configuration. It automates the process of image creation based on the specified configuration. On the other hand, the docker run command is used to launch new Docker containers based on created images.

Description of Commands

Details about the command and its parameters:

  • docker build is the Docker command for building images;
  • -t hi-app flag allows you to tag (name) the image. In this case, the image will be named hi-app;
  • . represents the build context path. Here, . means Docker will look for the Dockerfile in the current working directory.

The command docker run hi-app launches a container based on the hi-app Docker image. If the image exists locally, Docker will use it to create and start the container. If the image is not available locally, Docker will attempt to pull it from Docker Hub .

If you started the container from the terminal. Press the Ctrl+C key combination. This will stop the container.

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 2
We're sorry to hear that something went wrong. What happened?
some-alt