question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install Docker on Mac runners

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

3reactions
Jasperavcommented, 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:

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?

1reaction
joffrey-bioncommented, Aug 13, 2023

Here is the closed issue for the addition of colima: https://github.com/actions/runner-images/issues/6216.

You can also check the environment description for macos-latest runners (which is currently macOS 12).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install Docker Desktop on Mac
Install interactively · Double-click Docker.dmg to open the installer, then drag the Docker icon to the Applications folder. · Double-click Docker.app...
Read more >
How to Install Docker on MacOS?
How to Install Docker on a MacOS ... Step 1: Open the installer by double-clicking Docker.dmg, then drag the Docker icon to the...
Read more >
Docker for Mac: Homebrew Step-by-Step Tutorial
In this post, you'll learn how to install and use Docker for Mac with Homebrew. You'll also learn customization options and the basic...
Read more >
How to Install Docker on MacOS?
Click the “Download for Mac” button to download the latest version of Docker Desktop for Mac. · Once the download is complete, double-click...
Read more >
Docker For Mac: A Beginner's Guide To Installation
Install Docker on Mac · Open System Preferences and select Security & Privacy. · Choose the Privacy tab, and then Full Disk Access...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found