Create an image

You can create an image through manual configuration or Dockerfile uploading. Please prepare Dockerfiles as needed in advance.

Image creation is available only in the private repository.

 

  1. On the top navigation bar, click Business Apps.

  1. From the left navigation pane, select Software Center > Image Repositories.

  1. Click the Private Repository tab.

  1. Click the name of a project to open the image list page for the project.

  1. Click Create Image.

  1. Configure basic and advanced image parameters as required.

Table-1 Configuring image parameters

Parameter

Description

Image Category

Select an image category.

Image Name

Specify an image name according to the prompted rules.

One image can have multiple versions.

Image Version

Specify an image version. An image version must be unique for an image.

Creation Method

Select an image creation method. Options include Manual Configuration and Upload Dockerfile Files.

Manual Configuration

Image Source

Select an image from an image repository.

OS/ARCH

This field is available only if the selected image in the Image Source field is a multi-architecture image.

To create a multi-architecture image:

1.     Execute the following commands to pull the images that use different architectures:

docker pull image 1:tag

docker pull image 2:tag

2.     Execute the following command to create docker manifest:

docker manifest create --insure image name:tag image 1:tag image 2:tag

3.     Execute the following command to push the image to CloudOS:

docker manifest push image name:tag

Files

Select one or more files used by the image. The file formats are not limited.

Advanced Settings

  • Port—Specify one or a range of ports that are accessible from inside the container.

  • Commands—Specify programs or commands to be run for container creation.

  • Environment Variables—Specify environment variables in the running container. An environment variable contains a key-value pair:

  • Key—Enter a key.

  • Value—Enter a value or category.

  • Work Directory—Specify the work directory for the running container.

  • CMD—Enter the commands to be executed by the running container. These commands can be used together with EntryPoint.

  • EntryPoint—Enter the commands to be executed by the running container. These commands can be used together with CMD.

Upload Dockerfile Files

Files

Select one or more local Dockerfiles.

Dockerfile Preview

Preview Dockerfiles.

For manual configuration, the system automatically generates and displays Dockerfiles based on the selected image and configuration files.

 

  1. Click Create.