Merge bitcoin/bitcoin#28083: ci: Use DOCKER_BUILDKIT for lint image

fa2f18ad8e ci: Use DOCKER_BUILDKIT for lint image (MarcoFalke)

Pull request description:

  Currently the lint docker/podman image has many issues:

  * It relies on an EOL debian version.
  * It relies on a debian version different from the one used in the CI lint task.
  * It relies on the legacy docker build command, which requires the user to make `cd ./ci/lint/` before the build step.
  * It doesn't use the `.python-version` file, but a hardcoded version.

  Fix all issues by using the recommended `DOCKER_BUILDKIT=1` to generate the image.

  Also:
  * Rename `/tmp/python` to `/python_build`.
  * Compress all `pip install` commands into one.
  * Bump `.python-version`.

ACKs for top commit:
  jamesob:
    ACK fa2f18ad8e

Tree-SHA512: 804b384904ad753845667998841cc7825f4229933ca2c42af021384713486ec3cca80ba58612d37557fba7ee1921439dacca5e1236aac0557dd75bd9a2f1875d
This commit is contained in:
fanquake
2023-07-18 16:40:26 +01:00
7 changed files with 47 additions and 58 deletions

View File

@@ -7,10 +7,8 @@ To run linters locally with the same versions as the CI environment, use the inc
Dockerfile:
```sh
cd ./ci/lint
docker build -t bitcoin-linter .
DOCKER_BUILDKIT=1 docker build -t bitcoin-linter --file "./ci/lint_imagefile" ./
cd /root/of/bitcoin/repo
docker run --rm -v $(pwd):/bitcoin -it bitcoin-linter
```