16.4. Creating containers in the pod in the web console
You can create a container in a pod.
Prerequisites
You have installed the RHEL 10 web console.
For instructions, see Installing and enabling the web console.
The
cockpit-podmanadd-on is installed:# dnf install cockpit-podman
Procedure
- Log in to the RHEL 10 web console.
- Click Podman containers in the main menu.
- Click .
- In the Name field, enter the name of your container.
Provide the required information in the Details tab.
- Available only with the administrative access: Select the Owner of the container: System or User.
In the Image drop down list select or search the container image in selected registries.
- Optional: Check the Pull latest image checkbox to pull the latest container image.
The Command field specifies the command. You can change the default command if you need.
- Optional: Check the With terminal checkbox to run your container with a terminal.
- The Memory limit field specifies the memory limit for the container. To change the default memory limit, check the checkbox and specify the limit.
- Available only for system containers: In the CPU shares field, specify the relative amount of CPU time. Default value is 1024. Check the checkbox to modify the default value.
Available only for system containers: In the Restart policy drop down menu, select one of the following options:
- No (default value): No action.
- On Failure: Restarts a container on failure.
- Always: Restarts container when exits or after system boot.
Provide the required information in the Integration tab.
Click to add port mapping between the container and host system.
- Enter the IP address, Host port, Container port and Protocol.
Click to add volume.
- Enter the host path, Container path. You can check the Writable option checkbox to create a writable volume. In the SELinux drop down list, select one of the following options: No Label, Shared, or Private.
Click to add environment variable.
- Enter the Key and Value.
Provide the required information in the Health check tab.
- In the Command fields, enter the healthcheck command.
Specify the healthcheck options:
- Interval (default is 30 seconds)
- Timeout (default is 30 seconds)
- Start period
- Retries (default is 3)
When unhealthy: Select one of the following options:
- No action (default): Take no action.
- Restart: Restart the container.
- Stop: Stop the container.
Force stop: Force stops the container, it does not wait for the container to exit.
注記The owner of the container and pod are same. In the pod, you can inspect containers, change the status of containers, commit containers, or delete containers.
Verification
- Click Podman containers in the main menu. You can see the newly created container in the pod under the Containers table.