-
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
Docker not available in postCreateCommand (universal image) #780
Comments
Hi @mandrasch thank you for opening this issue and sharing the details. Have you considered adding a check inside your wait_for_docker() {
while true; do
docker ps > /dev/null 2>&1
if [ $? -eq 0 ]; then
break
fi
sleep 1
done
echo "Docker is ready."
} You may also attach this script to the
|
Hi @eljog, thanks very much for reply! I'll check this out as soon as I have resources for it. 👍 |
Went with this slightly altered version which seems to work: #!/bin/bash
set -ex
wait_for_docker() {
while true; do
docker ps > /dev/null 2>&1 && break
sleep 1
done
echo "Docker is ready."
}
wait_for_docker
# proceed with commands requiring docker |
Nice, thanks very much! 🎉👍 |
Hi,
we recently updated the docs for DDEV usage with Codespaces, https://ddev.readthedocs.io/en/latest/users/install/ddev-installation/#github-codespaces.
Users now reported, that they run into this, when they try to use
ddev
(which relies on Docker) onpostCreateCommand
:I tried it multiple times in the last week and this week - same error when I try to launch https://github.com/mandrasch/ddev-craftcms-vite.
This error results from here:
More detailed log:
The full creation.log: https://gist.github.com/mandrasch/001d52c50eb367dba466869f3439e0b3
I already left a comment here.
One user reported he used
postAttachCommand
as workaround, which worked fine. But in my understanding this would run every time the codespace is really opened in the browser IDE (source) - so not a real alternative for initial installation scripts.Thanks very much in advance for investigation!
Please let me know if I could assist in any way to help debug this.
Best regards, Matthias
The text was updated successfully, but these errors were encountered: