features icon indicating copy to clipboard operation
features copied to clipboard

Issues using docker-outside-of-docker

Open aidandempsey opened this issue 8 months ago • 3 comments

Hi team, In my devcontainer.json file, I'm using

	"features": {
		"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
	},

When I try to do "Repoen in Containr" (with the devcontainer VSCode plugin), it fails when trying to build the image with the following error

[2025-04-29T11:41:43.004Z] [2/2] STEP 6/9: RUN --mount=type=bind,from=dev_containers_feature_content_source,source=docker-outside-of-docker_0,target=/tmp/build-features-src/docker-outside-of-docker_0,z     cp -ar /tmp/build-features-src/docker-outside-of-docker_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/docker-outside-of-docker_0  && cd /tmp/dev-container-features/docker-outside-of-docker_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/docker-outside-of-docker_0
[2025-04-29T11:41:43.871Z] ERRO[0002] did not get container create message from subprocess: EOF 
[2025-04-29T11:41:43.935Z] error running container: from /usr/bin/runc creating container for [/bin/sh -c cp -ar /tmp/build-features-src/docker-outside-of-docker_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/docker-outside-of-docker_0  && cd /tmp/dev-container-features/docker-outside-of-docker_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/docker-outside-of-docker_0]: time="2025-04-29T12:41:43+01:00" level=warning msg="unable to get oom kill count" error="no directory specified for memory.oom_control"
time="2025-04-29T12:41:43+01:00" level=error msg="runc create failed: unable to start container process: error during container init: error mounting \"/var/tmp/buildah1737055232/mnt/buildah-bind-target-12\" to rootfs at \"/tmp/build-features-src/docker-outside-of-docker_0\": mount /var/tmp/buildah1737055232/mnt/buildah-bind-target-12:/tmp/build-features-src/docker-outside-of-docker_0 (via /proc/self/fd/6), flags: 0x5021: operation not permitted"
: exit status 1

OS: RHEL8 Container Runtime: Podman

I have confirmed that this problem does not occur using MacOS and Podman Thanks

aidandempsey avatar Apr 29 '25 12:04 aidandempsey

Hi @aidandempsey, Thanks for reporting the issue!

Could you please share your devcontainer.json to understand the issue better and it helps to reproduce the issue.

sireeshajonnalagadda avatar May 02 '25 07:05 sireeshajonnalagadda

Could this be https://github.com/microsoft/vscode-remote-release/issues/10585?

chrmarti avatar May 05 '25 07:05 chrmarti

@aidandempsey could you solve this?

I'm on Ubuntu 25.10 with podman 5.4.2. Devcontainers runs well but when using Installed podman via: apt-get install podman podman-compose - did not install podman-docker

  "features": {
    "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
  },

and then in the container I run docker build it outputs ERROR: error during connect: Head "http://%2Fvar%2Frun%2Fdocker.sock/_ping": EOF

On the host systemctl --user status podman.socket

● podman.socket - Podman API Socket
     Loaded: loaded (/usr/lib/systemd/user/podman.socket; enabled; preset: enabled)
     Active: active (listening) since Thu 2025-10-16 23:00:26 CEST; 18h ago
 Invocation: 86370aa1619542c8a410c775cb46321e
   Triggers: ● podman.service
       Docs: man:podman-system-service(1)
     Listen: /run/user/1000/podman/podman.sock (Stream)
     CGroup: /user.slice/user-1000.slice/[email protected]/app.slice/podman.socket

I do not mount anything int he devcontainers.json and I use the image mcr.microsoft.com/devcontainers/dotnet:1-8.0

any suggestions - thanx?

LMSSonos avatar Oct 17 '25 15:10 LMSSonos