Build the new Docker image

This topic shows you how to use Docker to build a custom image.

A new custom Docker image can be built on any host where Docker binaries are installed. To install these binaries, run the following command on the host where you want to build the new image:

docker build -t <image-name>:<tag> . -f Dockerfile
If you want to build your image on the Cloudera AI Workbench, you must add the --network=host option to the build command:
docker build --network=host -t <image-name>:<tag> . -f Dockerfile