-
Notifications
You must be signed in to change notification settings - Fork 875
/
Copy pathDockerfile.gstreamer-static-alpine
113 lines (93 loc) · 2.99 KB
/
Dockerfile.gstreamer-static-alpine
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# To build release:
# docker buildx build -f Dockerfile.gstreamer-static-alpine -t ghcr.io/hybridgroup/gstreamer:1.24-alpine --platform=linux/arm64,linux/amd64 --load .
FROM --platform=linux/amd64 alpine:3.20 AS builder-amd64
WORKDIR /gstreamer
ARG GST_BUILD_VERSION=1.24
RUN wget https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/${GST_BUILD_VERSION}/gstreamer-${GST_BUILD_VERSION}.tar.gz && \
tar -xzf gstreamer-${GST_BUILD_VERSION}.tar.gz
WORKDIR /gstreamer/gstreamer-${GST_BUILD_VERSION}
RUN apk update && apk add build-base \
libxml2-dev \
bison \
flex \
glib-dev \
gobject-introspection-dev \
libcap-dev \
libcap-utils \
meson \
perl \
wget \
git \
nasm
RUN meson --default-library=static --prefix=/gstbin \
-Dgst-full-target-type=static_library \
-Dauto_features=disabled \
-Dbase=enabled \
-Dgood=enabled \
-Dbad=enabled \
-Dgst-plugins-base:typefind=enabled \
-Dgst-plugins-base:playback=enabled \
-Dgst-plugins-base:volume=enabled \
-Dgst-plugins-base:audioconvert=enabled \
-Dgst-plugins-base:app=enabled \
-Dgst-plugins-good:isomp4=enabled \
-Dgst-plugins-good:rtp=enabled \
-Dgst-plugins-good:udp=enabled \
-Dgst-plugins-good:rtsp=enabled \
-Dgst-plugins-good:rtpmanager=enabled \
-Dgst-plugins-good:audioparsers=enabled \
-Dgst-plugins-bad:videoparsers=enabled \
-Dgst-plugins-bad:codectimestamper=enabled \
-Dgst-plugins-bad:openh264=enabled \
-Dtools=disabled \
build
RUN meson compile -C build
RUN meson install -C build
FROM --platform=linux/arm64 alpine:3.20 AS builder-arm64
WORKDIR /gstreamer
ARG GST_BUILD_VERSION=1.24
RUN wget https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/${GST_BUILD_VERSION}/gstreamer-${GST_BUILD_VERSION}.tar.gz && \
tar -xzf gstreamer-${GST_BUILD_VERSION}.tar.gz
WORKDIR /gstreamer/gstreamer-${GST_BUILD_VERSION}
RUN apk update && apk add build-base \
libxml2-dev \
bison \
flex \
glib-dev \
gobject-introspection-dev \
libcap-dev \
libcap-utils \
meson \
perl \
wget \
git \
nasm
RUN meson --default-library=static --prefix=/gstbin \
-Dgst-full-target-type=static_library \
-Dauto_features=disabled \
-Dbase=enabled \
-Dgood=enabled \
-Dbad=enabled \
-Dgst-plugins-base:typefind=enabled \
-Dgst-plugins-base:playback=enabled \
-Dgst-plugins-base:volume=enabled \
-Dgst-plugins-base:audioconvert=enabled \
-Dgst-plugins-base:app=enabled \
-Dgst-plugins-good:isomp4=enabled \
-Dgst-plugins-good:rtp=enabled \
-Dgst-plugins-good:udp=enabled \
-Dgst-plugins-good:rtsp=enabled \
-Dgst-plugins-good:rtpmanager=enabled \
-Dgst-plugins-good:audioparsers=enabled \
-Dgst-plugins-bad:videoparsers=enabled \
-Dgst-plugins-bad:codectimestamper=enabled \
-Dgst-plugins-bad:openh264=enabled \
-Dtools=disabled \
build
RUN meson compile -C build
RUN meson install -C build
ARG TARGETARCH
FROM builder-${TARGETARCH} AS final
ENV PATH=/gstbin/bin:${PATH}
ENV LD_LIBRARY_PATH=/usr/lib:/gstbin/lib:/usr/local/lib:${LD_LIBRARY_PATH}
ENV PKG_CONFIG_PATH=/gstbin/lib/pkgconfig