vmware / vmware/photon

[DOCS] Docker Rootless Support: Errors when running containers

Open
#1,474 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
3.2k
Forks
692
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

After I followed the instructions in the docs (https://vmware.github.io/photon/docs-v5/administration-guide/containers/docker-rootless-support/), I got the following error to run a container.

$ docker run --rm -it ubuntu:22.04
Unable to find image 'ubuntu:22.04' locally
22.04: Pulling from library/ubuntu
dbf6a9befcde: Pull complete
Digest: sha256:dfd64a3b4296d8c9b62aa3309984f8620b98d87e47492599ee20739e8eb54fbf
Status: Downloaded newer image for ubuntu:22.04
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: unable to apply cgroup configuration: unable to start unit "docker-bd28e138a723eae7a91b05268d98f9e227f484f5aeb8aab7b4bb98a5a2b12513.scope" (properties [{Name:Description Value:"libcontainer container bd28e138a723eae7a91b05268d98f9e227f484f5aeb8aab7b4bb98a5a2b12513"} {Name:Slice Value:"user.slice"} {Name:Delegate Value:true} {Name:PIDs Value:@au [989]} {Name:MemoryAccounting Value:true} {Name:CPUAccounting Value:true} {Name:IOAccounting Value:true} {Name:TasksAccounting Value:true} {Name:DefaultDependencies Value:false}]): Permission denied: unknown.
ERRO[0015] error waiting for container:
Reproduction steps
  1. Follow the instructions at https://vmware.github.io/photon/docs-v5/administration-guide/containers/docker-rootless-support/
  2. Run any container with docker run command
Expected behavior

A container should be successfully running.

Additional context

According to the following FAQ in the containerd repo,
https://github.com/containerd/nerdctl/blob/main/docs/faq.md#error-failed-to-create-shim-task-oci-runtime-create-failed-runc-create-failed-unable-to-start-container-process-unable-to-apply-cgroup-configuration-unable-to-start-unit--nameslice-valueuserslice-namedelegate-valuetrue--permission-denied-unknown

we also need to run the following command before running some containers.

systemctl --user start dbus

This is not described by dockerd-rootless-setuptool.sh check command though...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Docker Rootless Support page linked in the issue and reproduce the documented setup with docker run --rm -it ubuntu:22.04. Check the reported systemctl --user start dbus prerequisite and update the page so the instructions cover successful rootless container startup; verify the documented steps against the reproduction case.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.