nano-node
nano-node copied to clipboard
Fetch dependencies from APT repository when building Linux version of the node
Currently we fetch our dependencies from self hosted repository when building with our CI pipeline, which is a potential security risk as we do not verify it was not tampered with. This PR modifies dockerfiles to instead fetch all their dependencies from APT repository so there is no need to use self hosted versions. (Also bumps ubuntu version to 20.04 LTS because boost provided by 18.04 is outdated).
Commands that can be used to build node docker image from scratch locally:
# build base environment
docker build -f docker/ci/Dockerfile-base -t nano-env:base .
# build gcc environment
docker build --build-arg ENV_REPOSITORY=nano-env -f docker/ci/Dockerfile-gcc -t nano-env:gcc .
# build clang environment
docker build --build-arg ENV_REPOSITORY=nano-env -f docker/ci/Dockerfile-clang -t nano-env:clang .
# build node using default gcc environment
docker build --build-arg ENV_REPOSITORY=nano-env -f docker/node/Dockerfile -t nano-node .
# build node using clang environment
# (this still has some problems, we never built node with clang so should be used only for testing)
docker build --build-arg ENV_REPOSITORY=nano-env --build-arg COMPILER=clang -f docker/node/Dockerfile -t nano-node .
TODO in future PR: Provide a dedicated Dockerfile for building and running tests TODO in future PR: Convert macOS and Windows pipelines in the same way
Better to have a GitHub issue to properly track these, could you fill them @fikumikudev ?:
- TODO in future PR: Provide a dedicated Dockerfile for building and running tests
- TODO in future PR: Convert macOS and Windows pipelines in the same way