-
Notifications
You must be signed in to change notification settings - Fork 378
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
Codespaces: "Cannot connect to the Docker daemon" occurs randomly (postCreateCommand) #977
Comments
I thought this had already been dealt with a time or two in previous issues? |
Yes, there were fixes in docker-in-docker (universal image), but there is also a new spec for better lifecycle with docker in codespaces mentioned here: #634 (comment) I'm not sure if this improvement would solve the random docker connection error I saw a few times now or if this is unrelated, therefore I opened up a new issue. |
Hi 👋
This doesn't look good, the Can you update https://github.com/mandrasch/ddev-codespaces-launch-blank/blob/main/.devcontainer/postCreateCommand.sh as follows and see if this helps? Thanks!
|
Hi @samruddhikhandale, thanks very much for reply! Much appreciated! I tested the new wait for docker script. 1 attempt out of 11 still failed: In the failed attempt,
The sucessful attempts seem to run through some iterations before
Log of successful attempt: https://gist.github.com/mandrasch/8b296552af9c66a1acc4036a10f1154b |
Thanks for getting back to us. @gauravsaini04 Can you help investigate the issue? It would be good to find out what could be causing the docker to stop after getting started. |
Hi @samruddhikhandale, I was not able to replicate the issue. Tried approx. 20 - 25 times and it would pick up docker almost instantly and doesn't seem to be failing afterwards as well. @mandrasch, let me know if you are still facing the issue with docker daemon stopping randomly. |
Potentially unrelated, but I am attempting to start a supabase docker container in a github codespace prebuild.
I currently have this as my dev container config. My main goal is to avoid having to wait on docker registry downloads when running supabase start after first creation of a codespace. However, since this should just be a one time build time for the first creation of the the codespace it probably isn't work including in the prebuild {
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {
"ghcr.io/devcontainers-extra/features/supabase-cli:1": {}, // Supabase CLI installed
"ghcr.io/devcontainers-community/npm-features/prettier:1": {} // Prettier feature
},
"onCreateCommand": "npm install && supabase start", // Install dependencies and start frontend after Codespace is created
"postStartCommand": "supabase start && npm run dev" // Ensure Supabase and frontend run on every start
} |
Hi,
I'm trying to get DDEV - an open source Docker-based PHP development toolkit - working reliably in Codespaces. We already had a discussion here, there were some fixes for docker-in-docker in unversal image in the past (🙏 ) and @eiriksm (and others) provided a wait for docker script for the
postCreateCommand
, which I thought worked.But for some Codespaces launches I still run into
Other launches work fine as expected, current ratio is 5 working, 1 error - seems random.
My
devcontainer.json
:Example error output:
Full Log: https://gist.github.com/mandrasch/f0ddc7c275c8df68275c88bae5ec9424
My setup: https://github.com/mandrasch/ddev-codespaces-launch-blank
Usage: Browser-based
postCreateCommand: https://github.com/mandrasch/ddev-codespaces-launch-blank/blob/main/.devcontainer/postCreateCommand.sh
Is there a way to debug this? Thanks very much in advance for assistance! 🤗
The text was updated successfully, but these errors were encountered: