Switch to arch version

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-02-05 14:28:11 +01:00
parent 962a5d626b
commit cdd4a9dc86
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E
3 changed files with 24 additions and 9 deletions

View File

@ -9,17 +9,29 @@ RUN set -ex \
/tmp/dumb-init
FROM alpine:latest
FROM luzifer/arch-repo-builder as aur
ENV SKIP_VERIFY=true
RUN set -ex \
&& apk --no-cache add \
&& pacman -Syu --noconfirm nginx \
&& /usr/local/bin/run.sh "https://aur.archlinux.org/nginx-mod-rtmp.git" \
&& cp git/nginx-mod-rtmp-*.pkg.tar.xz /tmp/nginx-mod-rtmp.pkg.tar.xz
FROM luzifer/archlinux:latest
COPY --from=aur /tmp/nginx-mod-rtmp.pkg.tar.xz /tmp/
RUN set -ex \
&& pacman -Syu --noconfirm \
bash \
nginx \
nginx-mod-rtmp
&& pacman -U --noconfirm /tmp/nginx-mod-rtmp.pkg.tar.xz
COPY --from=fetch /tmp/dumb-init /usr/local/bin/
COPY docker-entrypoint.sh /usr/local/bin/
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=fetch /tmp/dumb-init /usr/local/bin/
COPY docker-entrypoint.sh /usr/local/bin/
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80 1935
VOLUME ["/data"]

View File

@ -2,6 +2,7 @@
set -euxo pipefail
# Ensure nginx can work with the /data dir
chown -R nginx: /data
chown -R http /data
chgrp -R http /data
exec nginx -g "daemon off;"

View File

@ -1,11 +1,11 @@
user nginx;
user http;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
include /etc/nginx/modules/rtmp.conf;
load_module /usr/lib/nginx/modules/ngx_rtmp_module.so;
events {
worker_connections 1024;
@ -40,6 +40,8 @@ http {
}
rtmp {
access_log off;
server {
listen 1935;