'runc create failed: Cwd must be an absolute path' error when deploying custom applications with oc new-app

Solution Unverified - Updated -

Issue

  • When deploying applications using custom container images with oc new-app command like below, it fails with 'runc create failed: Cwd must be an absolute path' error.
$ oc new-app --name sampleapp --docker-image registry.hub.docker.com/xxxxxxxx/sampleapp:latest


$ oc get pod sampleapp-1-xxxxx -n sample-namespace -o yaml
[...]
  containerStatuses:
    [...]
    state:
      waiting:
        message: |
          container create failed: time="2023-09-29T06:06:42Z" level=error msg="runc create failed: Cwd must be an absolute path"  <<<<<----------
        reason: CreateContainerError

$ omc get events -n sample-namespace
NAMESPACE               LAST SEEN   TYPE      REASON              OBJECT                              MESSAGE
sample-namespace        62m         Normal    Pulling             pod/sampleapp-1-xxxxx               Pulling image "registry.hub.docker.com/xxxxxx/sampleapp@sha256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
sample-namespace        64m         Normal    Pulled              pod/sampleapp-1-xxxxx               Successfully pulled image "registry.hub.docker.com/xxxxxx/sampleapp@sha256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" in 1.804659564s (1.804668575s including waiting)
sample-namespace        64m         Warning   Failed              pod/sampleapp-1-xxxxx               Error: container create failed: time="2023-09-29T06:04:53Z" level=error msg="runc create failed: Cwd must be an absolute path"   <<<<<----------

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content