# Unsigned Phase-1 image. Sapling-C will add cosign signing without
# changing the layer layout. Layer order: base -> deps -> app (most
# frequently re-built last, to maximise registry cache hits).
FROM python:3.12-slim

LABEL org.opencontainers.image.source="https://forge.618.ch/glcoin/glcoin"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.version="0.2.5"
LABEL org.opencontainers.image.title="glcoin-gateway"
LABEL org.opencontainers.image.description="HTTP resolver for glc://<addr> -> Kubo /ipfs/<CID>"

WORKDIR /app

RUN pip install --no-cache-dir aiohttp==3.9.5

COPY gateway.py /app/gateway.py

USER nobody
EXPOSE 8788 8789

ENTRYPOINT ["python3", "/app/gateway.py", "/etc/glcoin-gateway.conf"]
