35 lines
1.1 KiB
Docker
35 lines
1.1 KiB
Docker
# disinto-chat — minimal HTTP backend for Claude chat UI
|
|
#
|
|
# Small Debian slim base with Python runtime.
|
|
# Chosen for simplicity and small image size (~100MB).
|
|
#
|
|
# Image size: ~100MB (well under the 200MB ceiling)
|
|
#
|
|
# The claude binary is mounted from the host at runtime via docker-compose,
|
|
# not baked into the image — same pattern as the agents container.
|
|
|
|
FROM debian:bookworm-slim
|
|
|
|
# Install Python (no build-time network access needed)
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
python3 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Non-root user — fixed UID 10001 for sandbox hardening (#706)
|
|
RUN useradd -m -u 10001 -s /bin/bash chat
|
|
|
|
# Copy application files
|
|
COPY server.py /usr/local/bin/server.py
|
|
COPY entrypoint-chat.sh /entrypoint-chat.sh
|
|
COPY ui/ /var/chat/ui/
|
|
|
|
RUN chmod +x /entrypoint-chat.sh /usr/local/bin/server.py
|
|
|
|
USER chat
|
|
WORKDIR /var/chat
|
|
|
|
EXPOSE 8080
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/')" || exit 1
|
|
|
|
ENTRYPOINT ["/entrypoint-chat.sh"]
|