Giter Site home page Giter Site logo

davidoster / docker-nginx-rtmp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mikkun/docker-nginx-rtmp

0.0 1.0 0.0 2.96 MB

A Dockerfile for VOD streaming via RTMP/HLS

License: Apache License 2.0

HTML 18.92% CSS 4.97% XSLT 51.94% Shell 14.37% Nginx 9.81%

docker-nginx-rtmp's Introduction

docker-nginx-rtmp - A Dockerfile for VOD streaming via RTMP/HLS

Introduction

The docker-nginx-rtmp is a Dockerfile to create a Docker image using Debian GNU/Linux 8 as base and install nginx-rtmp.

Note: This is an experimental project to set up a nginx server for VOD streaming via RTMP/HLS.

Build

First, if you have not installed debootstrap and docker.io, execute the following command:

$ sudo apt-get install debootstrap docker.io

Second, if you do not need to use sudo when you use the docker command, execute the following commands:

$ sudo groupadd docker
$ sudo gpasswd -a ${USER} docker

Third, set the values of variables in make_docker_image and Dockerfile to your needs, as shown in the following example:

$ cat -n make_docker_image | awk 'NR>=8&&NR<=13'
     8  ARCH='i386'
     9  INCLUDE='iproute,locales'
    10  VARIANT='minbase'
    11  SUITE='jessie'
    12  TARGET="${SUITE}-${ARCH}"
    13  MIRROR='http://ftp.jp.debian.org/debian/'
$ cat -n Dockerfile | awk 'NR<=6'
     1  FROM local/jessie-i386:minbase
     2  MAINTAINER KUSANAGI Mitsuhisa <[email protected]>
     3
     4  ENV LANG ja_JP.utf8
     5  ENV NGINX_VERSION 1.8.0
     6  ENV RTMP_MODULE_VERSION 1.1.7

Fourth, execute make_docker_image to create a base image for Debian using debootstrap:

$ ./make_docker_image

And finally, build your new image from Dockerfile (do not forget the dot at the end):

$ docker build -t "local/jessie-<target architecture>:nginx-rtmp" .

Run

Start nginx using:

$ docker run --name=nginx-rtmp -p 80:80 -p 1935:1935 -v /path/to/docker-nginx-rtmp/html:/usr/local/nginx/html -d -i -t local/jessie-<target architecture>:nginx-rtmp

If you see the demo page of RTMP/HLS streaming, visit http://127.0.0.1/demo.html with your browser.

Stop the currently running container:

$ docker stop nginx-rtmp

Remove the stopped container:

$ docker rm -v nginx-rtmp

ToDo

  • MPEG-DASH support

References

License

Copyright 2015 KUSANAGI Mitsuhisa

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

docker-nginx-rtmp's People

Contributors

mikkun avatar

Watchers

David Oster aka George Pasparakis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.