Creating a QNX Container and checking its status

In this section, you create a container in your pod.

A Container Configuration file specifies the parameters to use when creating the QNX Container; refer to Appendix: Container Configuration.

When creating container configuration file, you must satisfy the following specifications:
  • Container names must be unique globally.
  • The pod ID, container name, and image name are the minimum required arguments when creating a container. Also, if the QNX Container image does not specify a USER field when it was built, then the run_as_user (and optionally the run_as_group) must be specified.
  • The ownership or permissions of the contents of the QNX Container image must match the specified UID and GID values when creating the container; otherwise, the container will fail to start.
  • If your application uses networking, you must mount /dev/socket into your container. Similarly, you may need to mount /dev/random or /dev/urandom if your application requires it; refer to Appendix: Container Configuration.
Create a simple container configuration from the container image you pulled into your local store earlier:
POD_ID=1c9351f553bdb7a51b39914ea24ad77b6ecb84283ccd6fd9561a15463c44c391
IMAGE=<aws_account_id>.dkr.ecr.us-east-1.amazonaws.com/hello-container-x86_64-qnx800:v0

echo "{
	\"pod_sandbox_id\": \"$POD_ID\",
	\"config\": {
		\"metadata\": {
			\"name\": \"container1\"
		},
		\"image\": {
			\"image\": \"$IMAGE\"
		},
		\"qnx\": {
			\"security_context\": {
				\"run_as_user\": 10,
				\"run_as_group\": 10
			}
		}
	}
}" > /tmp/container-config.json
The qcmctl container create command may then be used to create the above configuration as follows:
# qcmctl container create -I /tmp/container-config.json
95c4d59554183251af5eb21242c5e38c6493fff3013387a9f4e5f4c6fe9fd8f1
The container ID is returned on the output. In order to view the containers on the system, run the following command:
# qcmctl container list
NAME       CONTAINER ID STATE     CREATED
container1 95c4d5955418 Created   2025-05-28 09:13:31
To view more details on the container, run: the qcmctl container status command may be used with the container ID:
# qcmctl container status container1
FIELD       VALUE
Name        container1
Id          95c4d59554183251af5eb21242c5e38c6493fff3013387a9f4e5f4c6fe9fd8f1
State       Created
Created     2025-05-28 09:13:31
Next step would be to start your first created QNX Container!
Page updated: