Problem Statement
Which command is used to build a Docker image from a Dockerfile?
Explanation
The `docker build` command reads instructions in a Dockerfile in the specified directory (here '.'), builds layers accordingly, and tags the resulting image as 'myimage'. This is foundational for custom image creation.
Code Solution
SolutionRead Only
docker build -t myapp:latest .
Practice Sets
This question appears in the following practice sets:
