Menu

Tree [c1f54d] master /
 History

HTTPS access


File Date Author Commit
 .dockerignore 2021-01-14 jinbin jinbin [c1f54d] new project
 .gitignore 2021-01-14 jinbin jinbin [c1f54d] new project
 Dockerfile 2021-01-14 jinbin jinbin [c1f54d] new project
 LICENSE 2021-01-14 jinbin jinbin [c1f54d] new project
 README.md 2021-01-14 jinbin jinbin [c1f54d] new project
 default.conf 2021-01-14 jinbin jinbin [c1f54d] new project
 nginx.conf 2021-01-14 jinbin jinbin [c1f54d] new project
 update.sh 2021-01-14 jinbin jinbin [c1f54d] new project

Read Me

nginx-rtmp-docker (alpine)

Dockerfile for nginx-rtmp-module + njs (dynamic) + FFmpeg from source, buile on Alpine linux.


Licensing

nginx-rtmp-docker is licensed under the Apache License, Version 2.0. See
LICENSE for the full
license text.

import:
* alpine linux
* nginx
* nginx-rtmp-module
* njs
* ffmpeg


build

# simple build
docker build --tag binave/nginx-rtmp:1.17.10-alpine .

# custom version build
docker build \
    --tag binave/nginx-rtmp:1.17.10-alpine \
    --build-arg REPO_MIRRORS_URL=https://mirrors.aliyun.com/alpine \
    --build-arg ALPINE_VERSION=3.11.6 \
    --build-arg NGINX_VERSION=1.17.10 \
    --build-arg NGINX_RTMP_VERSION=1.2.1 \
    --build-arg NJS_VERSION=0.4.1 \
    --build-arg FFMPEG_VERSION=4.2.3 \
    .

# remove <none> images
docker images | awk '/<none>[[:space:]]+<none>/{printf " %s", $3};BEGIN{printf "docker rmi"}' | $SHELL

run

# ready
docker run --detach --rm --name nginx binave/nginx-rtmp:1.17.10-alpine tail -f /dev/null
mkdir /opt/nginx
docker cp nginx:/etc/ssl /opt/nginx
docker cp nginx:/etc/nginx/conf.d /opt/nginx
docker cp nginx:/usr/share/nginx/html /opt/nginx
docker stop nginx

# run
docker run --detach \
    --name nginx \
    --restart always \
    --publish 80:80 \
    --publish 443:443 \
    --publish 1935:1935 \
    --volume /opt/nginx/ssl:/etc/ssl \
    --volume /opt/nginx/conf.d:/etc/nginx/conf.d \
    --volume /opt/nginx/html:/usr/share/nginx/html \
    binave/nginx-rtmp:1.17.10-alpine

Let's Encrypt website

docker run --interactive --rm \
    --volume /opt/nginx/html:/www \
    --volume /opt/nginx/ssl/letsencrypt:/etc/letsencrypt \
    certbot/certbot \
    certonly \
        --agree-tos \
        --email user@example.com \
        --webroot \
        -w /www \
        -d www.example.com

alias nginx

cat >> ~/.bash_profile <<EOF
alias nginx='docker exec nginx nginx'
EOF
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.