# Use Redpanda as the base — its binary needs /opt/redpanda/libexec at runtime # and cannot be copied into another image FROM docker.redpanda.com/redpandadata/redpanda:v23.3.11 USER root # ── Install nginx + deps on top of the Redpanda (Debian-based) image ────────── RUN apt-get update && apt-get install -y --no-install-recommends \ nginx \ curl \ netcat-openbsd \ && rm -rf /var/lib/apt/lists/* # ── Copy all config files (flat root layout) ────────────────────────────────── COPY redpanda.yaml /etc/redpanda/redpanda.yaml COPY nginx.conf /etc/nginx/nginx.conf COPY start.sh /start.sh COPY init-topics.sh /init-topics.sh RUN chmod +x /start.sh /init-topics.sh # ── nginx needs these dirs writable by user 1000 ────────────────────────────── RUN mkdir -p /var/lib/redpanda/data \ /var/log/nginx \ /var/lib/nginx \ /run \ && chown -R 1000:1000 \ /var/lib/redpanda \ /etc/redpanda \ /var/log/nginx \ /var/lib/nginx \ /run \ /etc/nginx \ /start.sh \ /init-topics.sh # HF Spaces only exposes 7860 publicly EXPOSE 7860 USER 1000 ENTRYPOINT ["/start.sh"]