Page MenuHomePhabricator

[docker] Run the install script in its own directory
ClosedPublic

Authored by Fabien on Jul 7 2022, 08:12.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC20065ff97b18: [docker] Run the install script in its own directory
Summary

The bitcoin-abc-dev image is built by copying the repo and running the dependencies installation script. That script is run from the tree root, which causes 2 issues:

  • There might be download leftovers (actually there are), that are taking space for no reason
  • There might be conflict with some of the project config files, actually there is one with the Cargo.toml file during installation of corrosion.

Boths issues can be fixed by running the script in a dedicated temporary directory which is removed after the script completed.

Test Plan

From the tree root (preferably cleaned from any build artifact):

docker build -f contrib/docker/bitcoin-abc-dev/Dockerfile -t dev .

Then:

docker run -it dev

Check the pwd is /bitcoin-abc, the tree is here and there is no other file here. Check /install no longer exists.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable