sajad torkamani

Command

docker build -t <image-name:tag> <path-to-dockerfile>

Example

docker build -t node-app:latest .

This will build a Docker image called node-app with the tag latest using the Dockerfile in the current directory.

When the image is built, running docker image ls should output something like:

REPOSITORY              TAG               IMAGE ID       CREATED              SIZE
node-app                latest            31df54fd672e   About a minute ago   905MB
Tagged: Docker