build in a docker environment #25681

pull gregwebs wants to merge 3 commits into bitcoin:master from gregwebs:build-docker changing 8 files +172 −0
  1. gregwebs commented at 3:57 am on July 23, 2022: contributor

    This PR add a docker build. You can read more about it in the documentation file in the PR.

    I was having trouble building this project so I switched to a dockerized build and thought I would share it with everyone. This could greatly improve things for someone looking to make a first contribution or those looking to build from source to improve providence.

  2. gregwebs force-pushed on Jul 23, 2022
  3. gregwebs force-pushed on Jul 23, 2022
  4. gregwebs force-pushed on Jul 23, 2022
  5. gregwebs force-pushed on Jul 23, 2022
  6. add scripts for building in a docker environment 24ae4bf12a
  7. docker build: support linting ea0f5be8d9
  8. gregwebs force-pushed on Jul 23, 2022
  9. chinggg commented at 3:18 pm on July 23, 2022: contributor
    Thanks! It sounds like a good idea to have a Docker setup. I just realize that our official repo does not contain any Dockerfile or CI/CD file for building bitcoin. Though Cirrus CI is always running, it seems to run tests instead of checking the build process. FYI, I can find a Dockerfile in https://github.com/google/oss-fuzz/blob/master/projects/bitcoin-core/Dockerfile.
  10. sipa commented at 3:46 pm on July 23, 2022: member
    There has been earlier discussion here: https://github.com/bitcoin-core/packaging/issues/55
  11. gregwebs commented at 11:21 pm on July 24, 2022: contributor

    There is an image from that issue that points to a good Dockerfile. Although I saw that Dockerfile and it has lots of things and I didn’t understand how they all worked.

    But that is for packaging a reproducible build. This Dockerfile is designed for a development workflow. Those are two different use cases.

  12. MarcoFalke commented at 5:03 am on July 25, 2022: member

    But that is for packaging a reproducible build. This Dockerfile is designed for a development workflow. Those are two different use cases.

    What developers are you referring to? People working on Bitcoin Core that use docker/podman/whatever already have their scripts for their use cases fledged out. I don’t think the dockerfile in this pull is going to supersede any of that. It seems more like a dev environment for your use case.

    Some more references about docker use:

    So I am wondering for whom you are writing the dockerfile in this pull.

  13. chinggg commented at 5:48 am on July 25, 2022: contributor

    So I am wondering for whom you are writing the dockerfile in this pull. @MarcoFalke I think he is writing Dockerfile for someone who is new to Bitcoin-Core and has problem building it? As he said at first: This could greatly improve things for someone looking to make a first contribution or those looking to build from source to improve providence.

    However, I am also new to bitcoin but I think build-unix.md already teach me how to build, which is basically installing dependencies then configure and make. Personally I won’t use Docker if I am new to a project.

  14. MarcoFalke commented at 5:51 am on July 25, 2022: member
    See also #10903 (Add configuration files for a Docker-based development environment)
  15. in build-docker/Dockerfile:4 in ea0f5be8d9 outdated
    0@@ -0,0 +1,32 @@
    1+FROM alpine
    2+
    3+# build depndencies
    4+RUN apk update && apk add \
    


    jarolrod commented at 6:33 am on July 25, 2022:
    This dependency list is making a biased decision on how to build bitcoin core, primarily on not including qt related dependencies to build bitcoin-qt
  16. jarolrod commented at 6:34 am on July 25, 2022: member

    concept nack

    I don’t see a strong motivation for introducing this into the repo. Ideally, someone completely new to the project could quickly get up to speed with the build docs and be able to successfully compile on their own. With the docs across build-* and depends/, I’d assume that trouble compiling is an issue of “not reading the docs” or us not placing information in the best way/correct places.

    I was having trouble building this project …

    Any feedback on how we can improve the build documentation would be great.

  17. MarcoFalke commented at 6:50 am on July 25, 2022: member
    Concept ACK, if this helps on-board new devs or improves UX for existing devs, but it would be good to hear from at least one dev that will be using this first to avoid adding an unused script.
  18. laanwj commented at 8:58 am on July 25, 2022: member
    I have nothing against including a docker config, but it should not be required. I am sometimes annoyed by projects that have docker builds as the only (realistic) option for doing development. And it’s not like we don’t already have the depends system to facilitate easy install of dependencies :smile: .
  19. fanquake commented at 9:36 am on July 25, 2022: member

    Concept NACK. This isn’t something we need to maintain in this repo. If anything, maybe the discussion can be restarted in https://github.com/bitcoin-core/packaging.

    I was having trouble building this project

    What issue were you having? Why was introducing Docker the solution?

  20. in build-docker/Dockerfile:15 in ea0f5be8d9 outdated
    10+  build-base \
    11+  libtool \
    12+  db-c++ \
    13+  db-dev \
    14+  boost-system \
    15+  boost-program_options \
    


    fanquake commented at 9:40 am on July 25, 2022:
    This list includes a number of dependencies that are not required to compile Bitcoin Core. i.e boost-filesystem, boost-system, boost-program-options, libressl.

    gregwebs commented at 3:55 pm on July 25, 2022:
    I removed boost-program-options. Other docker images that the community has created contain the rest of these libraries so it seems like they are needed. It is now easy to test this out with the docker build, but I am not familiar with all the configure options.
  21. MarcoFalke commented at 9:41 am on July 25, 2022: member

    Concept NACK. This isn’t something we need to maintain in this repo. If anything, maybe the discussion can be restarted in https://github.com/bitcoin-core/packaging.

    I think this pull was intended for developers, not for packaging, in which case this would be the right repo, but this should be clarified.

  22. gregwebs commented at 10:56 am on July 25, 2022: contributor

    Personally I don’t chase dependencies for snowflake installs anymore. I use Docker, nix, or a shell script and a single install command.

    It seems there is a desire for a docker build given all the things that are being pointed to from this pull request.

    With that being said I would rather not convince maintainers to maintain something they don’t want to. I should be able to put this into a separate repo. Then I think what is missing is some documentation suggesting these community solutions for those wanting to use Docker.

  23. better specify dependencies dfba537081
  24. gregwebs force-pushed on Jul 25, 2022
  25. gregwebs commented at 4:36 pm on July 25, 2022: contributor
  26. luke-jr commented at 2:39 am on July 26, 2022: member

    This seems fine if there are developers (like @gregwebs) willing to maintain it. At least 2 others should probably agree to be available for reviewing it.

    Mergers are supposed to be janitorial, not dictators over what is supported. If there are developers willing to do the work, that should be sufficient.

    (Note that I do not personally use Docker, and will not be reviewing Docker stuff)

  27. gregwebs commented at 3:05 am on July 26, 2022: contributor

    @luke-jr thank you for the support. However, after making a separate repo I like it that way. I think it is just as convenient as in repo, and in some cases actually better because it is easy to build an older version. The reason to put it in repo is for it to be more official and to try to ensure a better review process. However, a Dockerfile is easy to audit, and the demand for this approach is unknown right now.

    I would still like to create a document linking to different community efforts at Docker builds.

  28. gregwebs closed this on Jul 26, 2022

  29. bitcoin locked this on Jul 26, 2023

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-09-29 01:12 UTC

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