-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for using docker with macOS #252
base: master
Are you sure you want to change the base?
Conversation
We remove the local debian cache stuff since it doesn't work on a docker container running on a macOS host.
959966e
to
ff8d247
Compare
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? |
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. |
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 |
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. |
Co-authored-by: Andrew#128 <[email protected]> Summary ------- As a follow-up to !1248, it turns out with some minor modifications, it's possible to build using gitian on Docker for macOS! This may save time for people that run macOS natively (such as me). In short: This MR allows the `--docker` options to work on macOS without failing. In a future MR I will also compose some documentation about how to get it working on macOS 100%. For now it also needs you to use a fork of gitian-builder from here: https://github.com/cculianu/gitian-builder.git BRANCH: macos_support_no_debian_cache There is a PR for this change that I submitted to the main gitian-builder repo: devrandom/gitian-builder#252 Test Plan --------- - Run gitian builder on Linux as normal to ensure that nothing broke. **Optional:** - If you are on a **macOS** host, get docker installed and running, check-out this branch, and also check-out: https://github.com/cculianu/gitian-builder.git branch: `macos_support_no_debian_cache` into your `gitian-builder` directory. - Put the modified script from this MR on the top-level, next to your `bitcoin-cash-node` directory. - Run: `./gitian-build.py --setup --docker` - Run: `./gitian-build.py --docker -b -D -n -c -o lwm "satoshi" master` - After a great deal of time waiting for it to rebuild the universe, you should have some static binaries built!
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.