Configuring Dockerfile Parameters for CCI
This section describes how to apply Dockerfile configurations to Cloud Container Instance (CCI).
The following uses an example to describe the relationship between them.
FROM ubuntu:16.04 ENV VERSION 1.0 VOLUME /var/lib/app EXPOSE 80 ENTRYPOINT ["./entrypoint.sh"] CMD ["start"]
In the preceding example, the Dockerfile contains common parameters, including ENV, VOLUME, EXPOSE, ENTRYPOINT, and CMD. These parameters can be configured for CCI as follows:
- ENV indicates an environment variable. When creating a workload on CCI, set ENV in the advanced settings, as shown in the following figure.

- VOLUME indicates a container volume. Generally, this parameter is used together with docker run -v host path:container volume path.
For CCI, Elastic Volume Service (EVS) disks can be mounted to containers. You only need to add EVS volumes, and configure their sizes and mount paths (that is, container volume paths) when creating workloads.

- ENTRYPOINT and CMD correspond to the startup command of the advanced setting of CCI. For details, see Configuring the Container Startup Command.

- EXPOSE indicates an exposed port. Generally, this parameter is used together with docker run -p <host port>:<container port> when a container is started. To set an exposed port for a CCI container, you only need to configure the Workload access port:Container port when creating a workload. In this way, you can access the container through the Workload domain name:Workload access port.

Next Article: Creating Workloads with Different Methods
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.