HomePhabricator

[docker] Run the install script in its own directory

Description

[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

Details

Provenance
FabienAuthored on Jul 7 2022, 08:03
FabienPushed on Jul 7 2022, 13:44
Reviewer
Restricted Project
Differential Revision
D11725: [docker] Run the install script in its own directory
Parents
rABCebd6a64d4b67: [Chronik] Add fallible `Hashed` methods for parsing byte slices and hex string
Branches
Unknown
Tags
Unknown