Spaces:
Sleeping
Sleeping
File size: 1,403 Bytes
b00cd33 0122e2f b00cd33 0122e2f b00cd33 0122e2f b00cd33 0122e2f b00cd33 0122e2f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | # 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"]
|