contrib: add dockerfile for building image fron source code #30702

pull Yihen-Liu wants to merge 1 commits into bitcoin:master from Yihen-Liu:master changing 3 files +800 −0
  1. Yihen-Liu commented at 5:38 am on August 23, 2024: none

    It may help developers save time in these aspects:

    1. when developers want to deploy a test environment on a new machine, they don’t need to pay too much attention to the details of the compilation environment, which is a waste of time.

    2. The self-constructed image can be quickly distributed to others who want to test it without building from source code.

    3. In a distributed development environment (I mean development for bitcoin core), an available dockerfile can help independent developers align the compilation environment.

  2. DrahtBot commented at 5:38 am on August 23, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept NACK tdb3

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Scripts and tools on Aug 23, 2024
  4. maflcko commented at 5:58 am on August 23, 2024: member
    1. when developers want to deploy a test environment on a new machine, they don’t need to pay too much attention to the details of the compilation environment, which is a waste of time.

    Not sure. What is the point of testing on a new machine when you fall back to a hardcoded default config? Testing is useful when variation to the underlying system and other invariants are introduced, while checking the tests still succeed.

    Once you modify the dockerfile to the extent where everything is configurable, the developer has to pay attention the the configuration, which seems harder than just doing it without a dockerfile, because there is another layer of indirection.

    In any case, have you seen the existing CI dockerfiles, which are probably what you are looking for? If not, it would be good to explain the difference.

    The self-constructed image can be quickly distributed to others who want to test it without building from source code.

    I am not sure an opaque binary blob is useful for reproducible testing. Also, there are guix builds, which are reproducible and is probably what you are looking for? If not, it would be good to explain the difference.

    In a distributed development environment (I mean development for bitcoin core), an available dockerfile can help independent developers align the compilation environment.

    Not sure. Bitcoin Core does not require a strict compilation environment. It should work on any reasonable system out of the box. If not, it would be good to mention the issues encountered, so that they can be fixed, instead of focussing on a less-optimal solution.

  5. DrahtBot added the label CI failed on Aug 23, 2024
  6. DrahtBot commented at 6:49 am on August 23, 2024: contributor

    🚧 At least one of the CI tasks failed. Debug: https://github.com/bitcoin/bitcoin/runs/29149602375

    Make sure to run all tests locally, according to the documentation.

    The failure may happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  7. Yihen-Liu force-pushed on Aug 23, 2024
  8. contrib: add dockerfile for building image fron source code 7da793d080
  9. Yihen-Liu force-pushed on Aug 23, 2024
  10. DrahtBot removed the label CI failed on Aug 23, 2024
  11. glozow commented at 8:52 am on August 23, 2024: member
    • In a distributed development environment (I mean development for bitcoin core), an available dockerfile can help independent developers align the compilation environment.

    I’m pretty sure dev environment convergence is something we explicitly don’t want for Bitcoin Core.

    In any case, have you seen the existing CI dockerfiles, which are probably what you are looking for? If not, it would be good to explain the difference.

    +1

  12. fanquake commented at 3:22 pm on August 23, 2024: member
    ~0. I’m not convinced this is something we need to add or maintain (also given existing options), or that if we did, this repository is the right place for it. Agree with the other comments.
  13. in contrib/docker/bitcon.conf:3 in 7da793d080
    0@@ -0,0 +1,692 @@
    1+##
    2+## bitcoin.conf configuration file.
    3+## Generated by contrib/devtools/gen-bitcoin-conf.sh.
    


    tdb3 commented at 5:43 pm on August 23, 2024:
    Storing a duplicate bitcoin.conf (when one can be generated with get-bitcoin-conf.sh directly from bitcoind --help) would lead to increased maintenance effort.

    Yihen-Liu commented at 12:06 pm on August 26, 2024:
    Thanks for your replies, I learned a lot. This is my first bitcoin core path, I will continue to learn
  14. tdb3 commented at 5:49 pm on August 23, 2024: contributor

    Thank you for your interest in the project. Based on the following, I’m going to have to Concept NACK this one.

    ~0. I’m not convinced this is something we need to add or maintain (also given existing options), or that if we did, this repository is the right place for it. Agree with the other comments.

    I agree with this. I think it’s great if developers/users would like to dockerize builds independently, but this doesn’t seem like something that should be added to this repository. Additionally, there are plans to migrate to CMake in the near future.

    • In a distributed development environment (I mean development for bitcoin core), an available dockerfile can help independent developers align the compilation environment.

    I’m pretty sure dev environment convergence is something we explicitly don’t want for Bitcoin Core.

    Yes, this is important for ensuring platform diversity and finding platform-associated bugs.

  15. achow101 closed this on Aug 23, 2024


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me