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

Зміст курсу

Docker for Python Developers

Building and Running 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.

Все було зрозуміло?

Секція 2. Розділ 2
course content

Зміст курсу

Docker for Python Developers

Building and Running 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.

Все було зрозуміло?

Секція 2. Розділ 2
some-alt