Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

docker-in-docker broken after upgrading from universal:0-linux to universal:1-linux #1016

Closed
jeremymeng opened this issue Aug 27, 2021 · 3 comments

Comments

@jeremymeng
Copy link
Member

  • VSCode Version:
  • Local OS Version:
  • Reproduces in: Codespaces
  • Name of Dev Container Definition with Issue: codespaces-linux

Development container image information

More info: https://github.com/microsoft/vscode-dev-containers/tree/main/containers/codespaces-linux/history/1.6.3.md

Steps to Reproduce:

  1. create a Codespace at https://github.com/Azure/azure-sdk-for-js
  2. start the Codespace
  3. open a terminal then type docker ps

Error:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

@jeremymeng
Copy link
Member Author

@Chuxel
Copy link
Member

Chuxel commented Aug 27, 2021

When upgrading from 0-linux to 1-linux, you need to add --privileged to runArgs in devcontainer.json for Docker to continue to function. I can see that's missing from the devcontainer.json file in that repository so you'll hit a permission error (that you can see in /tmp/dockerd.log).

If you want to retain your containers across "rebuilds", you should also add the following to mounts:

"mounts": ["source=codespaces-linux-var-lib-docker,target=/var/lib/docker,type=volume"],

Let us know if you still see a problem.

@Chuxel Chuxel closed this as completed Aug 27, 2021
@jeremymeng
Copy link
Member Author

@Chuxel Thanks a lot for the help!

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

No branches or pull requests

2 participants