Before you upload a container image to CCE's container registry, build the image on your local Docker client.
Docker can build container images automatically by reading the instructions from a Dockerfile, a text file that contains all the commands needed to build a given image. For details on how to write a Dockerfile, visit https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/.
For details on how to build a container image from a Dockerfile, see https://docs.docker.com/engine/reference/builder/.
Section Building Container Images presents an example of how to build container images of the Guestbook application.
Docker 1.10.0 or a later version must be installed on the virtual or physical machine that you use to build container images.
To check the Docker version, run the following command:
Example command output:
Version: 1.12.1 API version: 1.24 Go version: go1.6.3 Git commit: 23cf638 Built: Thu Aug 18 05:22:43 2016 OS/Arch: linux/amd64
In the command output, the Version field indicates the Docker version.
If the displayed version is earlier than 1.10.0 or the Docker is not installed, download Docker 1.10.0 or a later version at https://www.docker.com/ and install it by following the instructions provided at https://docs.docker.com/.