mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
Add Docker support
This commit is contained in:
parent
ccbd1d4a83
commit
814e94b6b0
11
README.md
11
README.md
@ -306,6 +306,17 @@ It is recommended to compile on Ubuntu or MacOS,compiling on windows is cumber
|
|||||||
});
|
});
|
||||||
|
|
||||||
```
|
```
|
||||||
|
## Docker Image
|
||||||
|
You can pull a pre-built docker image from Docker Hub and run with
|
||||||
|
```bash
|
||||||
|
docker run -id -p 1935:1935 -p 8080:80 gemfield/zlmediakit
|
||||||
|
```
|
||||||
|
|
||||||
|
Dockerfile is also supplied to build images on Ubuntu 16.04
|
||||||
|
```bash
|
||||||
|
cd docker
|
||||||
|
docker build -t zlmediakit .
|
||||||
|
```
|
||||||
|
|
||||||
## Mirrors
|
## Mirrors
|
||||||
|
|
||||||
|
36
docker/Dockerfile
Normal file
36
docker/Dockerfile
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
#shell,rtmp,rtsp,rtsps,http,https
|
||||||
|
EXPOSE 9000/tcp
|
||||||
|
EXPOSE 1935/tcp
|
||||||
|
EXPOSE 554/tcp
|
||||||
|
EXPOSE 322/tcp
|
||||||
|
EXPOSE 80/tcp
|
||||||
|
EXPOSE 443/tcp
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
cmake \
|
||||||
|
git \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
libssl-dev \
|
||||||
|
libmysqlclient-dev \
|
||||||
|
libx264-dev \
|
||||||
|
libfaac-dev \
|
||||||
|
libmp4v2-dev && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN mkdir -p /opt/media
|
||||||
|
|
||||||
|
WORKDIR /opt/media
|
||||||
|
RUN git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit && \
|
||||||
|
cd ZLMediaKit && git submodule update --init --recursive && \
|
||||||
|
mkdir -p build release/linux/Release/
|
||||||
|
|
||||||
|
WORKDIR /opt/media/ZLMediaKit/build
|
||||||
|
RUN cmake -DCMAKE_BUILD_TYPE=Release .. && \
|
||||||
|
make -j4
|
||||||
|
|
||||||
|
ENV PATH /opt/media/ZLMediaKit/release/linux/Release/:$PATH
|
||||||
|
|
||||||
|
CMD MediaServer
|
Loading…
Reference in New Issue
Block a user