gitian-builder icon indicating copy to clipboard operation
gitian-builder copied to clipboard

Allow for using docker with macOS

Open cculianu opened this issue 4 years ago • 5 comments
trafficstars

Hi, I have been using gitian builder on macOS with some success. It only works with the docker vm mechanism, obviously. I found I needed to modify the script that generates the Dockerfile though, to not use a local debian cache in the 'Darwin' case. This MR is my modification. With this modification it 100% works on docker.

This is by no means an exhaustive set of changes -- perhaps some usage patterns will still fail on macos -- but with this at least it works for 1 path -- building the container and running the builder.

cculianu avatar Aug 26 '21 11:08 cculianu

I would prefer if this (or #249) would disable the caching based on a command line flag.

devrandom avatar Sep 06 '21 14:09 devrandom

I would prefer if this (or #249) would disable the caching based on a command line flag.

Hmm.. ok. Does it ever make sense to use the caching when on macOS host?

cculianu avatar Sep 06 '21 14:09 cculianu

Well, the ideal solution for non-Debian OSes would be to run the apt-cache in a VM or a docker and point the gitian builder at that.

devrandom avatar Sep 06 '21 14:09 devrandom

Ah I see true.

Well perfect is the enemy of good enough. As it stands now gitian-builder just won't work at all on macOS as a docker host.. so .. until someone does implement a CLI arg.. this PR at least makes it work. shrug

cculianu avatar Sep 06 '21 14:09 cculianu

Maintaining per-OS conditionals is not ideal from a maintenance burden point of view. And a command line flag isn't that much additional effort.

devrandom avatar Sep 06 '21 14:09 devrandom