aboutsummaryrefslogtreecommitdiff
path: root/ci/lint_imagefile
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-07-18 16:40:26 +0100
committerfanquake <fanquake@gmail.com>2023-07-18 16:40:39 +0100
commitc6a338b67e8e7848e6f42329a8b0bf3add16ad51 (patch)
treede3be474dafd456aa2abdc6e6195b6cfc87c9bbc /ci/lint_imagefile
parent673acab223c0f896767b1ae784659df9f95452ae (diff)
parentfa2f18ad8e386f067c2d7d5362f6b4dd84c295a0 (diff)
Merge bitcoin/bitcoin#28083: ci: Use DOCKER_BUILDKIT for lint image
fa2f18ad8e386f067c2d7d5362f6b4dd84c295a0 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 https://github.com/bitcoin/bitcoin/pull/28083/commits/fa2f18ad8e386f067c2d7d5362f6b4dd84c295a0 Tree-SHA512: 804b384904ad753845667998841cc7825f4229933ca2c42af021384713486ec3cca80ba58612d37557fba7ee1921439dacca5e1236aac0557dd75bd9a2f1875d
Diffstat (limited to 'ci/lint_imagefile')
-rw-r--r--ci/lint_imagefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/ci/lint_imagefile b/ci/lint_imagefile
new file mode 100644
index 0000000000..20047ea391
--- /dev/null
+++ b/ci/lint_imagefile
@@ -0,0 +1,19 @@
+# See test/lint/README.md for usage.
+
+FROM debian:bookworm
+
+ENV DEBIAN_FRONTEND=noninteractive
+ENV LC_ALL=C.UTF-8
+
+COPY ./.python-version /.python-version
+COPY ./ci/lint/docker-entrypoint.sh /entrypoint.sh
+COPY ./ci/lint/04_install.sh /install.sh
+
+RUN /install.sh && \
+ echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \
+ chmod 755 /entrypoint.sh && \
+ rm -rf /var/lib/apt/lists/*
+
+
+WORKDIR /bitcoin
+ENTRYPOINT ["/entrypoint.sh"]