mirror of
https://github.com/MayersScott/rkn-block-checker.git
synced 2026-07-09 17:29:01 +00:00
feat: Run in Docker
This commit is contained in:
parent
a1f8de5a39
commit
9a105d59b8
4 changed files with 75 additions and 0 deletions
11
.dockerignore
Normal file
11
.dockerignore
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
.git
|
||||
.github
|
||||
.pytest_cache
|
||||
__pycache__
|
||||
*.py[cod]
|
||||
*.egg-info
|
||||
.venv
|
||||
venv
|
||||
dist
|
||||
build
|
||||
docs/sample-output.json
|
||||
19
Dockerfile
Normal file
19
Dockerfile
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
FROM python:3.12-slim
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
RUN pip install --no-cache-dir .
|
||||
|
||||
ENTRYPOINT ["rkn-check"]
|
||||
CMD ["--help"]
|
||||
34
README.md
34
README.md
|
|
@ -86,6 +86,40 @@ 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
|
||||
|
|
|
|||
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
services:
|
||||
rkn-check:
|
||||
build:
|
||||
context: .
|
||||
image: rkn-block-checker:latest
|
||||
stdin_open: true
|
||||
tty: true
|
||||
working_dir: /work
|
||||
volumes:
|
||||
- ./:/work
|
||||
command: ["--help"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue