You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have to add this code for Mac runners when I need Docker to be available:
HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask docker
sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components
open -a /Applications/Docker.app --args --unattended --accept-license
echo "We are waiting for Docker to be up and running. It can take over 2 minutes..."
while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
It takes a lot of time. Would you be able to install it by default?
Thanks.
Reacted by Chris Lunsford
Reacted by Chris Birch, Martin Turóci, Josep Lluis Giralt D'Lacoste ( Pep ), Fern Support, Jim Fisher and Michael Adam
@armenzg I use your code to run Docker in Mac, it works most of the time. However, it sometimes fails with this error:
Run brew install --cask docker
brew install --cask docker
sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components
open -a /Applications/Docker.app --args --unattended --accept-license
echo "We are waiting for Docker to be up and running. It can take over 2 minutes..."
while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
shell: /bin/bash -e {0}
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
SSH_AUTH_SOCK: /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//ssh-uRt0rNE2QGjc/agent.1085
SSH_AGENT_PID: 1086
==> Downloading https://desktop.docker.com/mac/main/amd64/72247/Docker.dmg
Warning: macOS's Gatekeeper has been disabled for this Cask
==> Installing Cask docker
Error: BOM for path '/private/tmp/d20211216-1296-14vsyc0/dmg.2FlyK0' is empty.
==> Purging files for version 4.3.1,72247 of Cask docker
Error: Process completed with exit code 1.
Any idea how I can prevent that error?
Reacted by Alex Babrykovich, Kye Russell and c-warwick
I had no idea that colima was now in mac runners by default. Could you link to that addition @joffrey-bion ? That will help DDEV so much. It's been doing so much work to do its colima setup.
@Jasperav nope, I'm sorry I'm not part of GitHub, just a humble user 😅 But I would also like to know, because if that's a conscious decision then I'm going to have problems too!
Colima has worked all the way through macOS 13 and 14, but has had very significant problems getting v0.6.* stabilized in the last couple of weeks. But further comment belongs in the colima issue queue. Please read the release notes for v0.6.*, as a new profile has to be created, you lose existing volumes, containers, and images.
@rfay But the problem I am facing is that colima isn't available on macos-13 in the first place in Github Actions or is that related? I added a comment here: actions/runner-images#6216.
Here's how to use Colima with macos-13 in GitHub Actions until it's added there. I have no idea why it wasn't there in the first place (and have no idea why macos-latest is macos-12):
I'm using a macos-13 runner, and I managed to start up my services using docker-compose using the tricks and tips mentioned in the comments in this thread.
However, I'm unable to access the services themselves as part of the CI workflow (my Github Workflow launches services via docker-compose using colima, and then another (non-Dockerized) app tries to contact these services as part of e2e testing, in the same Workflow).
So I have this snippet in my Workflow:
- name: Run the required services
run: |
docker-compose up -d
docker ps
and the output for which, during the Workflow run, is:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
274e549a0abf e2e-testing-demo-add_server "/build/target/relea…" 5 seconds ago Up Less than a second 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp e2e-testing-demo-add_server-1
Now, I have an app which POSTs to the endpoints of these services. It wasn't working, so I decided to test via curl:
- name: Test services using curl
run: |
curl -X POST -H 'Content-Type: application/json' -d '{"x": 200, "y": 100}' http://localhost:9000/exec
but these fail with the error: curl: (7) Failed to connect to 0.0.0.0 port 9000 after 1 ms: Couldn't connect to server. Error: Process completed with exit code 7.
I also tried using 0.0.0.0 and 127.0.0.1 instead of localhost, but it's the same result.
Is there some networking issue going on in here, maybe related to colima? Does anybody have a clue?
Activity
armenzg commentedon Nov 19, 2021
Closed as per actions/runner-images#2150
Jasperav commentedon Dec 16, 2021
@armenzg I use your code to run Docker in Mac, it works most of the time. However, it sometimes fails with this error:
Any idea how I can prevent that error?
joffrey-bion commentedon Aug 13, 2023
FTR, since the addition of colima to macOS runners, I now just need the following:
Or when using docker-compose:
You might need
colima start --mount-type 9pto allow the containers launched via docker-compose to use chown (see abiosoft/colima#54 (comment))This usually takes between 1m30 and 2m, which is not perfect, but still much better than before.
rfay commentedon Aug 13, 2023
I had no idea that colima was now in mac runners by default. Could you link to that addition @joffrey-bion ? That will help DDEV so much. It's been doing so much work to do its colima setup.
joffrey-bion commentedon Aug 13, 2023
Here is the closed issue for the addition of colima: actions/runner-images#6216.
You can also check the environment description for
macos-latestrunners (which is currently macOS 12).Jasperav commentedon Nov 20, 2023
@joffrey-bion Any idea why it is removed on macos 13? It doesn't work anymore
joffrey-bion commentedon Nov 20, 2023
@Jasperav nope, I'm sorry I'm not part of GitHub, just a humble user 😅 But I would also like to know, because if that's a conscious decision then I'm going to have problems too!
rfay commentedon Nov 20, 2023
Colima has worked all the way through macOS 13 and 14, but has had very significant problems getting v0.6.* stabilized in the last couple of weeks. But further comment belongs in the colima issue queue. Please read the release notes for v0.6.*, as a new profile has to be created, you lose existing volumes, containers, and images.
Jasperav commentedon Nov 20, 2023
@rfay But the problem I am facing is that colima isn't available on macos-13 in the first place in Github Actions or is that related? I added a comment here: actions/runner-images#6216.
rfay commentedon Nov 20, 2023
Here's how to use Colima with macos-13 in GitHub Actions until it's added there. I have no idea why it wasn't there in the first place (and have no idea why macos-latest is macos-12):
https://github.com/ddev/ddev/blob/05ceed549d7807b1cebd63082910e54c37b1319e/.github/workflows/colima-tests.yml#L102-L106
timmyjose commentedon Mar 15, 2024
Hello,
I'm using a
macos-13runner, and I managed to start up my services usingdocker-composeusing the tricks and tips mentioned in the comments in this thread.However, I'm unable to access the services themselves as part of the CI workflow (my Github Workflow launches services via
docker-composeusingcolima, and then another (non-Dockerized) app tries to contact these services as part of e2e testing, in the same Workflow).So I have this snippet in my Workflow:
and the output for which, during the Workflow run, is:
Now, I have an app which POSTs to the endpoints of these services. It wasn't working, so I decided to test via
curl:but these fail with the error:
curl: (7) Failed to connect to 0.0.0.0 port 9000 after 1 ms: Couldn't connect to server. Error: Process completed with exit code 7.I also tried using
0.0.0.0and127.0.0.1instead oflocalhost, but it's the same result.Is there some networking issue going on in here, maybe related to
colima? Does anybody have a clue?colima?
Also buildx
colima?
Also buildx
colima?
Also buildx
ci(core): create release when pushing a semver tag (#3431)
ci(core): create release when pushing a semver tag (lambdaclass#3431)
ci(core): create release when pushing a semver tag (lambdaclass#3431)
Fix CI: only exclude docker tests on macOS, not OCI builds