• Usage: Tags the image with a name and optionally a tag.

  • Command:

    docker build -t my-image:latest .
    
    
    • This command tags the built image as my-image:latest.