Use musl in ecosystem docker (#3998)

This prevents errors when the host glibc is newer than the one in the docker container
This commit is contained in:
konstin
2023-04-25 21:54:53 -06:00
committed by GitHub
parent b9c06b48e1
commit 19d8913e32
2 changed files with 7 additions and 2 deletions

View File

@@ -6,9 +6,14 @@
# Either download https://github.com/akx/ruff-usage-aggregate/blob/master/data/known-github-tomls.jsonl as
# `github_search.jsonl` or follow the instructions in the README to scrape your own dataset.
#
# Setup:
# ```
# apt-get install musl-tools # or corresponding command to install musl on your platform, e.g. `yay musl`
# rustup target add x86_64-unknown-linux-musl
# ```
# From the project root:
# ```
# cargo build
# cargo build --target x86_64-unknown-linux-musl
# docker buildx build -f scripts/Dockerfile.ecosystem -t ruff-ecosystem-checker --load .
# docker run --rm ruff-ecosystem-checker
# ```
@@ -17,6 +22,6 @@ FROM python:3.11
RUN python -m venv .venv && .venv/bin/pip install ruff
ADD scripts/check_ecosystem.py check_ecosystem.py
ADD github_search.jsonl github_search.jsonl
ADD target/debug/ruff ruff-new
ADD target/x86_64-unknown-linux-musl/debug/ruff ruff-new
CMD ["python", "check_ecosystem.py", "--verbose", "--projects", "github_search.jsonl", "ruff-new", ".venv/bin/ruff"]