In this tutorial you will build a Docker container image.
The following section contains a complete Packer template that can be used to build an Ubuntu Docker image.
Create a file named
docker-ubuntu.pkr.hcl and add the following code:
Run through the following Pack commands to build the image(s):
Initialize your Packer configuration.
List all the Docker images to confirm that Packer successfully built your Docker image.
$ docker images