# Copyright (c) The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.

# See test/lint/README.md for usage.

FROM mirror.gcr.io/ubuntu:24.04

# Pin uv and ruff to minor version to avoid breaking changes
# https://docs.astral.sh/uv/reference/policies/versioning/
# https://docs.astral.sh/ruff/versioning/
COPY --from=ghcr.io/astral-sh/uv:0.10 /uv /uvx /bin/
COPY --from=ghcr.io/astral-sh/ruff:0.15 /ruff /bin/

COPY ./ci/retry/retry /ci_retry
COPY ./.python-version /.python-version
COPY ./ci/lint/requirements.txt /ci/lint/requirements.txt
COPY ./ci/lint/01_install.sh /install.sh

RUN /install.sh && \
  rm -rf /var/lib/apt/lists/*

WORKDIR /bitcoin
