Has anyone tried to install docker using flox?

I just tried to install docker + docker-machine using flox but then got stuck at finding a working driver for MacOS M1. So I resorted to an installer on the Docker website.

Has anyone attempted a flox-only install? How did you do it?

Thanks.

Hi @etorreborre! I know we have tried to install docker using flox without issues, but I don’t think docker-machine. Did you have issues when trying to install docker alone or only when you tried docker-machine as well?

I tried to install docker and go docker-compose but I am told that I need to start a daemon

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

So I tried my luck with installing docker-machine but couldn’t get it to work.

It actually connects to another question about flox. The blog post about flox vs Homebrew does not mention that Homebrew also knows how to start services on a mac which, for now, I see as a major difference between the 2. It would be nice if flox could do that as well. I don’t what that entails on flox’s side, because then you have to adapt to various ways of starting services depending on the target platform. What are your thoughts on the subject?

I’ve passed on your query re starting services on a mac internally and will revert once I know more. I am aware you have another related thread on this topic as well so I will try to get more info for you. :slight_smile:

In the meantime I am trying to reproduce your issues with installing Docker. Now I am not a Docker user so pardon my naive questions but are you having issues when installing it or when trying to actually use it. I just installed it without issues on my macbook:

rtb@Robins-MacBook-Pro ~ % flox install -e test docker
created generation 1
rtb@Robins-MacBook-Pro ~ % flox activate -e test
flox [test default] rtb@Robins-MacBook-Pro ~ % flox list -e test
robinbrantley/aarch64-darwin.test
    Alias     test
    System    aarch64-darwin
    Path      /Users/rtb/.local/share/flox/environments/robinbrantley/aarch64-darwin.test
    Curr Gen  1

Packages
    0  stable.nixpkgs-flox.docker  20.10.23

ok, so running docker info gives me the same error message you are having…

I confirmed with Michael that when he was using Docker, it was on his linux box, while you and I are trying this on a mac.

Discussing your services query internally, this is not something flox does yet but definitely something for us to consider supporting in the future. I have confirmed we have an internal ticket to ensure this suggestion is not forgotten.

As a potential workaround, I did find Building and running Docker images — nix.dev documentation which gives some suggestions when using macOS which might be of help?

Thanks Robin. I have tried to dig a bit more but so far I haven’t found anything that was working for Mac. So I think I am going to keep the Docker desktop application on Mac now.

1 Like

perfect, I’ll be sure to let you know if I hear any further workarounds or updates. :+1: