

RUN chown -R $CONTAINER_USER: /home/linuxbrew/. I needed to chown the /home/linuxbrew/.linuxbrew folder to the user that would be running Homebrew: USER root It is worth noting that Colima doesn’t auto start when we turn on our machine so we need to remember to run colima start after each reboot.
#Homebrew install docker mac for mac
Gabriel's answer mostly worked for me, but was missing one step. That’s it, Docker Desktop for Mac is gone and we now have a quick and simple replacement thanks to Colima. RUN useradd -m -s /bin/zsh linuxbrew & \Ĭhown -R linuxbrew: /home/linuxbrew/.linuxbrew The new correct way is: RUN apt-get update & \Īpt-get install -y -q -allow-unauthenticated \ to have a system set of libs in the default prefix and tweaked formulae for development in /homebrew. Whichever brew command is called is where the packages will be installed. If you need to download it manually, Please click the link below to download Install. Create a Homebrew installation wherever you extract the tarball. Loading Docker app after, click Next, May ask you macOS Login password, You can just enter. Also, locales is added to install UTF-8 or brew will throw a warning when you run the command. MacOS Docker Install use Homebrew Install. PS: I have added -no-install-recommends to ignore optional dependencies and rm -rf /var/lib/apt/lists/* to remove apt-get leftovers thus reducing the image size. RUN useradd -m -s /bin/bash linuxbrew & \Įcho 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >/etc/sudoersĮNV PATH="/home/linuxbrew/.linuxbrew/bin:$" RUN localedef -i en_US -f UTF-8 en_US.UTF-8

Like so, FROM ubuntu:18.04Īpt-get install build-essential curl file git ruby-full locales -no-install-recommends -y & \ If you must use Bionic (18.04), the correct way to install homebrew will be to follow the steps in the official Dockerfile.īut to get your Dockerfile working, you need to install ruby, create a non-root user and execute the installation script as that user. Is there a reason you can't use the official image ( docker pull linuxbrew/linuxbrew)? It is based on Ubuntu 16.04 / Xenial.
