-
Notifications
You must be signed in to change notification settings - Fork 1
/
prod.Dockerfile
44 lines (35 loc) · 884 Bytes
/
prod.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM ubuntu:20.04 AS build
# Downloading dependencies
RUN apt-get update && \
apt-get install -y \
g++ \
cmake \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libavutil-dev
# Setting up user
RUN useradd -m user && yes password | passwd user
# Configuring working environment
RUN mkdir -p /app
COPY CMakeLists.txt /app
COPY src /app/src
RUN mkdir -p /app/build
WORKDIR /app/build
# Building
RUN cmake -DCMAKE_BUILD_TYPE=Release .. && \
cmake --build . -j 8
# Running ---------------
FROM ubuntu:20.04 AS run
EXPOSE 8080
EXPOSE 4577/udp
# Downloading dependencies
RUN apt-get update && \
apt-get install -y \
libavcodec58 \
libavformat58 \
libswscale5 \
libavutil56
WORKDIR /app
COPY --from=build /app/bin/Release/media-server .
ENTRYPOINT [ "./media-server", "rtsp://192.168.0.16:5544/jpeg/"]