[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.
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D11725