FROM docker.redpanda.com/redpandadata/console:latest AS console-src FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive # ── 1. System deps ────────────────────────────────────────────────────────── RUN apt-get update && apt-get install -y \ curl nginx supervisor ca-certificates \ && rm -rf /var/lib/apt/lists/* # ── 2. Redpanda ────────────────────────────────────────────────────────────── RUN curl -1sLf 'https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh' \ | bash \ && apt-get install -y redpanda \ && rm -rf /var/lib/apt/lists/* # ── 3. Console binary — correct path is /app/console not /app/redpanda-console COPY --from=console-src /app/console /usr/local/bin/redpanda-console RUN chmod +x /usr/local/bin/redpanda-console # ── 4. User matching HF Spaces runtime UID 1000 ────────────────────────────── RUN useradd -m -u 1000 -s /bin/bash rpuser # ── 5. Directories ──────────────────────────────────────────────────────────── RUN mkdir -p \ /home/rpuser/data \ /home/rpuser/logs \ /var/log/supervisor \ /run/nginx \ /var/lib/nginx/body \ /var/lib/nginx/proxy \ && chown -R 1000:1000 \ /home/rpuser \ /var/log/supervisor \ /var/log/nginx \ /var/lib/nginx \ /run/nginx \ && touch /run/nginx.pid \ && chown 1000:1000 /run/nginx.pid # ── 6. Configs ──────────────────────────────────────────────────────────────── COPY --chown=1000:1000 redpanda.yaml /home/rpuser/redpanda.yaml COPY --chown=1000:1000 console.yaml /home/rpuser/console.yaml COPY --chown=1000:1000 nginx.conf /etc/nginx/nginx.conf COPY --chown=1000:1000 supervisord.conf /etc/supervisor/conf.d/supervisord.conf USER 1000 EXPOSE 7860 CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]