f8bbb783b0
Nieuw bestand control/app_volumes.py met Libpod volume operaties:
- GET /volumes — lijst alle volumes (optioneel ?filters=key=value)
- POST /volumes — volume aanmaken (name, driver, labels, driverOpts)
- GET /volumes/{name} — details van één volume
- GET /volumes/{name}/exists — bestaanskontrolle (204 → true, 404 → false)
- DELETE /volumes/{name} — volume verwijderen (?force=true optioneel)
- POST /volumes/prune — ⚠️ verwijdert alle ongebruikte volumes
Filters: key=value formaat wordt automatisch omgezet naar
{"key":["value"]} JSON dat de Libpod API verwacht.
Containerfile: COPY app_volumes.py toegevoegd.
app.py: init_volumes_router geregistreerd.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 lines
458 B
Docker
15 lines
458 B
Docker
FROM docker.io/library/python:3.12-slim
|
|
WORKDIR /app
|
|
RUN apt-get update && apt-get install -y curl systemd && rm -rf /var/lib/apt/lists/*
|
|
RUN pip install fastapi uvicorn requests-unixsocket pyyaml pytest httpx
|
|
COPY app.py .
|
|
COPY app_images.py .
|
|
COPY app_volumes.py .
|
|
COPY app_files.py .
|
|
COPY app_networks.py .
|
|
COPY app_pods.py .
|
|
COPY app_containers.py .
|
|
COPY app_system.py .
|
|
COPY common.py .
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|