Skip to content
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

Build zcash on any system w/ Docker+bash via ./contrib/dev-docker/run.sh. #4741

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nathan-at-least
Copy link
Contributor

Please ensure this checklist is followed for any pull requests for this repo. This checklist must be checked by both the PR creator and by anyone who reviews the PR.

  • Relevant documentation for this PR has to be completed and reviewed by @mdr0id before the PR can be merged

The documentation lives in ./contrib/dev/docker/README.md.

  • A test plan for the PR must be documented in the PR notes and included in the test plan for the next regular release

Test plan A:

  1. Make two clones of the same zcashd revision which has this ./contrib/dev-docker feature on a Debian/Ubuntu dev machine which also has docker installed.
  2. In the first run ./zcutil/build.sh.
  3. In the second, run ./contrib/dev-docker/run.sh
  4. Compare the results.

Ideally the results would be byte-wise binary compatible but that's very likely not to be the case. At the very least, both should produce all the same file names, and the full test suite should run on both, and the zcashd --version output of both builds should match.

Test Plan B

Do the same as Test Plan A, except on the first "direct" build, do it on a system without docker, and on the second docker build, do it on a non-debian/non-ubuntu linux system with docker, then compare the results in the same manner.

What this demonstrates: This shows that building with this dev-docker approach allows anyone with docker to build without installing the dev toolchain directly onto their host system.

@str4d str4d added A-build Area: Build system F-docker Feature: Docker support labels Sep 24, 2020
cd "$(readlink -f "$0/../../../")"
docker build \
-t zcash-dev-docker \
--build-arg "BUILDER_UID=$(id -u)" \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On linux, this will need to be run with sudo (as docker doesn't allow execution without superuser permissions.); however, if you run the whole run.sh script with sudo then id -u returns 0, which then fails the adduser call in the dockerfile.

This should be documented and overrideable.

@daira daira marked this pull request as draft February 18, 2021 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build Area: Build system F-docker Feature: Docker support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants