build: add Docker packaging for rkn-check CLI

This commit is contained in:
Anton Tanchin 2026-05-07 17:30:40 +03:00
parent 9a105d59b8
commit 374023895a
2 changed files with 5 additions and 36 deletions

View file

@ -9,11 +9,14 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
COPY pyproject.toml requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN pip install --no-cache-dir .
RUN pip install --no-cache-dir --no-deps .
RUN useradd --create-home --shell /bin/bash rkncheck
USER rkncheck
ENTRYPOINT ["rkn-check"]
CMD ["--help"]

View file

@ -86,40 +86,6 @@ pip install -e .
rkn-check
```
## Run with Docker
Build the image:
```bash
docker build -t rkn-block-checker .
```
Show CLI help:
```bash
docker run --rm rkn-block-checker
```
Run a real check:
```bash
docker run --rm rkn-block-checker --json
```
Use custom target lists from the current directory:
```bash
docker run --rm -v "$PWD:/work" -w /work rkn-block-checker \
--white-file ./whitelist.txt \
--black-file ./blacklist.txt
```
With Docker Compose:
```bash
docker compose run --rm rkn-check --json
```
## Usage
```text