Run nested containers in workspaces

Run nested containers in OpenShift Dev Spaces workspaces using tools like Podman. This feature uses Linux kernel user namespaces for isolation, so that users can build and run container images within their workspaces.

Before you begin

About this task

Important:

Previously created workspaces cannot be started after enabling this feature. Users must create new workspaces.

Important:
  • This feature is available on OpenShift 4.20 and later versions.

Procedure

Configure the CheCluster custom resource to enable container run capabilities:
oc patch checluster/devspaces -n openshift-devspaces \
  --type='merge' -p \
  '{"spec":{"devEnvironments":{"disableContainerRunCapabilities":false}}}'

Results

  • Create a new workspace and verify that Podman is available:
    podman run --rm hello-world