-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (39 loc) · 945 Bytes
/
Dockerfile
File metadata and controls
58 lines (39 loc) · 945 Bytes
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
ARG MEDIAMTX_REPO=https://github.com/bluenviron/mediamtx.git
ARG MEDIAMTX_BRANCH=v1.17.0
# Build Stage
FROM golang:1.25-alpine AS builder
ARG MEDIAMTX_REPO
ARG MEDIAMTX_BRANCH
RUN apk add --no-cache git make
WORKDIR /build
RUN git clone ${MEDIAMTX_REPO} . \
&& git checkout ${MEDIAMTX_BRANCH} \
&& case "${MEDIAMTX_REPO}" in *bluenviron/mediamtx*) ;; *) echo "v0.0.0-custom" > internal/core/VERSION ;; esac \
&& go generate ./... \
&& go build -o /mediamtx .
# Final Stage
FROM bluenviron/mediamtx:1.17.0-ffmpeg
# Copy custom binary
COPY --from=builder /mediamtx /mediamtx
# SRT
EXPOSE 8890
# API
EXPOSE 9997
# Metrics
EXPOSE 9998
# PPROF
EXPOSE 9999
# Playback
EXPOSE 9996
# HLS
EXPOSE 8888
RUN apk add --no-cache bash vim yq nodejs npm
COPY mediamtx.yml /
COPY start /
COPY package.json /
COPY package-lock.json /
RUN npm install
COPY index.ts /
COPY lib/ /lib/
COPY routes/ /routes/
ENTRYPOINT [ "/start" ]