Spaces:
Sleeping
Sleeping
| # 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"] | |