Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker containers fail to start inside the instance created from the image (docker in docker) #10

Open
karolpivo opened this issue Feb 22, 2023 · 0 comments

Comments

@karolpivo
Copy link

We are testing an Ansible role that deploys Docker and starts containers.

This works on top of the following images (docker engine gets installed and containers started):

  • docker-rockylinux8-ansible
  • docker-centos8-ansible

The containers fail in all the other images that we've tried ( docker engine gets installed and docker service starts but the containers fail to start):

  • docker-ubuntu2204-ansible
  • docker-ubuntu2004-ansible
  • docker-debian11-ansible

Containers fail to start with the following error message (the same on all the images):

Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error reopening /dev/null inside container: open /dev/null: operation not permitted: unknown

We use the recommended platform config (which works on Rocky and Centos8):

  - name: instance
    image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2204}-ansible:latest"
    command: ${MOLECULE_DOCKER_COMMAND:-""}
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:rw
    cgroupns_mode: host
    privileged: true
    pre_build_image: true

I'd appreciate any suggestions on how to address this if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant