dockerfile build image code example Example 1: docker build image docker build --tag hello . Example 2: docker build docker build -t [tag] .