2021-06-03 01:33:19 +02:00
|
|
|
# Base Image used to create this Image
|
2022-02-15 22:35:36 +01:00
|
|
|
FROM debian:bullseye-slim
|
2021-06-02 23:25:21 +02:00
|
|
|
|
2021-06-03 01:33:19 +02:00
|
|
|
# Maintainer
|
2022-02-15 22:35:36 +01:00
|
|
|
LABEL maintainer="hi@bluemedia.dev"
|
2021-06-02 23:25:21 +02:00
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
ENV RTMP_PORT 1935
|
|
|
|
ENV HTTP_PORT 8080
|
2021-06-04 21:38:26 +02:00
|
|
|
ENV HLS_FRAGMENT_LENGTH 3
|
|
|
|
ENV HLS_PLAYLIST_LENGTH 20
|
2021-06-02 23:25:21 +02:00
|
|
|
|
2021-06-03 01:33:19 +02:00
|
|
|
# Update and install packages
|
2021-06-02 23:25:21 +02:00
|
|
|
RUN apt update -y && \
|
|
|
|
apt upgrade -y && \
|
|
|
|
apt autoremove -y && \
|
|
|
|
apt install nginx libnginx-mod-rtmp -y && \
|
|
|
|
apt clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
2021-06-03 01:33:19 +02:00
|
|
|
# Create nginx user
|
|
|
|
RUN useradd -s /bin/false nginx
|
2021-06-02 23:25:21 +02:00
|
|
|
|
|
|
|
# Copy files into image
|
|
|
|
COPY config/ /template/
|
|
|
|
COPY frontend/ /var/www/html/
|
|
|
|
COPY entrypoint /entrypoint
|
|
|
|
RUN chmod +x /entrypoint && chown -R www-data:www-data /var/www/html/
|
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint"]
|
|
|
|
CMD ["/usr/sbin/nginx"]
|