Build and Run a Container
Get introduced to basic Docker commands to build an image and run a container.
We'll cover the following
Build a Docker image
Before you run a container, you first have to create an image. You can achieve that by using the docker build
command. docker build
creates an image from the Dockerfile
.
Connect to the terminal via the terminal widget, which can be found at the end of this lesson. Once connected, the contents of the current directory will be displayed. You can observe that the Dockerfile
is available in the directory.
To further inspect the Dockerfile
, you can use the following command:
Get hands-on with 1200+ tech skills courses.