Containerized applications can be deployed and managed using the LMI.
About this task
Containers can be created and managed using this page.
Containers cannot be created until:
- Install the relevant container extension. For more information, see Container extensions.
- An image must be pulled for the installed extension using the Images tab on this page. If the image repository requires new endpoint and authentication details, use the Registry tab to create a new registry first.
Note: Container updates do not use the LMI two phase deployment model. Changes are deployed immediately once saved.
Procedure
-
Navigate to System > Container Extensions > Containers.
-
Click the Registries tab to manage Registry entries.
-
To create a new Registry entry:
- Click New.
- Provide the required details and click Save.
-
To update an existing Registry entry:
- Select the required registry in the list.
- Click Edit.
- Make the required changes and click Save.
-
To delete a Registry entry:
- Select the required entry.
- Click Delete.
-
Click the Images tab to manage container images.
-
To pull a new container image:
- Click Pull.
- Provide the full image name. For example,
icr.io/ibmappgateway/ibm-application-gateway:26.03.0 .
- Click the Pull button to confirm the action.
-
To update an existing image:
- Select the required image in the list.
- Click Update.
- Click Yes to confirm the update.
-
To delete an existing image:
- Select the image in the list.
- Click Delete.
-
Click the Volumes tab to manage container volumes.
-
To create a new empty volume:
- Click New.
- Provide the volume name.
- Click Save.
-
To import files into a volume:
- Select the volume from the list.
- Click Import.
- Select the zip file to import. Files are extracted into the volume in the same structure and state as they exist in the zip file.
- Click Import.
-
To export the files in a volume as a zip file:
- Select the volume from the list.
- Click Export.
-
To delete a volume:
- Select the volume from the list.
- Click Delete.
-
Click the Secrets tab to manage container secrets.
-
To create a new secret:
- Click New.
- Provide the secret name and value.
- Click Save.
-
To delete a secret:
- Select the secret from the list.
- Click Delete.
-
Click the Containers tab to manage containers. The grid displays all existing containers and their current states.
-
To create a new container:
- Click New. Note that if no extensions or images exist, an error will be displayed.
- Provide the container name, image to use and type.
- Optionally, you can also set the port mappings by selecting the Ports tab.
Note: If the container image has no port mappings in the metadata then the Ports tab will not be shown.
To add port mappings:
- Click New.
- Select the port name from the drop-down list.
- Provide the port mapping. Specify either a port number (for example 12345) or a host plus port number (for example 0.0.0.0:12345).
- Click Save.
- Optionally, you can also set the volume mappings by selecting the Volumes tab.
Note: If the container image has not volume mappings in the metadata then the Volumes tab will not be shown.
- Click New.
- Select the volume name from the drop-down list.
- Select the volume from the drop-down list.
Note: If the volume mapping is not added in the Volumes tab, it will not be shown in the drop-down list.
- Click Save.
- Optionally, you can set environment variables for the new container by selecting the Environments tab.
- Click New.
- Provide the variable name and value.
- Click Save.
- Optionally, you can set the secret mappings by selecting the Secrets tab.
- Click New.
- Select the secret from the drop-down list.
Note: If the secret is not added in the Secrets tab, it will not be shown in the drop-down list.
- Provide the Target. It can be either an environment variable name or a file path.
- Click Save.
- Optionally, you can set the advanced options by selecting the Advanced tab.
- Select the required entry point, if the container is targeted to run as a specific entry point.
Note: If the container image has no override entry points in the metadata then this section will not be shown.
- Set Arguments for the selected entry point.
- Update the Logging Configuration.
- Click Save to create the new container.
-
To view the details of an existing container:
- Select the container from the list.
- Click View.
Note: The View Container window displays only the added container details, for example, if no port mapping was defined when creating the container, the Ports tab will not be shown.
-
To delete an existing container:
- Select the container from the list.
- Click Delete.
-
To stop, start or restart an existing container:
- Select the container from the list.
- Click the Start, Stop or Restart button as required.
-
To view the log file of an existing container:
- Click View in the Log column of the required container.