• Build an Image from Dockerfile.

  • Meaning: Builds an image using a specific Dockerfile. Usage: To create an image from a Dockerfile located in the current directory. Example: docker build -t my-app:latest -f Dockerfile . builds the my-app:latest image using the Dockerfile.

    docker build -t my-app:latest -f Dockerfile .