Build Docker image from Dockerfile
11 March 2022 (Updated 11 March 2022)
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
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment