-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathDockerfile
More file actions
128 lines (109 loc) · 3.63 KB
/
Copy pathDockerfile
File metadata and controls
128 lines (109 loc) · 3.63 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# SPDX-FileCopyrightText: 2025 Contributors to the Media eXchange Layer project.
# SPDX-License-Identifier: Apache-2.0
ARG BASE_IMAGE_VERSION=24.04
FROM ubuntu:${BASE_IMAGE_VERSION}
ARG DEBIAN_FRONTEND=noninteractive
RUN echo 'vm.swappiness=0' >> /etc/sysctl.conf
COPY ./scripts/ /tmp/scripts
# Install basic and runtime dependencies
RUN apt clean all && apt-get update \
&& apt-get install -y --no-install-recommends \
wget \
curl \
zip \
unzip \
tar \
lsb-release \
apt-transport-https \
ca-certificates \
software-properties-common \
git \
git-lfs \
openssh-client \
pkg-config \
build-essential \
gdb \
nasm \
doxygen \
graphviz \
autoconf \
automake \
libtool \
pkg-config \
bison \
flex \
htop \
ccache \
rustup \
librdmacm-dev \
libsysprof-capture-4-dev
ARG CLANG_VERSION=19
RUN apt-get install -y --no-install-recommends \
"clang-${CLANG_VERSION}" \
"clang-tools-${CLANG_VERSION}" \
"clang-tidy-${CLANG_VERSION}" \
"clang-format-${CLANG_VERSION}" \
"llvm-${CLANG_VERSION}" \
"clangd-${CLANG_VERSION}" \
"lld-${CLANG_VERSION}" \
cmake \
ninja-build
# Make the selected clang version the default alternative
RUN /tmp/scripts/debian/register-clang-version.sh "${CLANG_VERSION}" 100
RUN apt-get update && apt-get install -y --no-install-recommends \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-x
RUN /tmp/scripts/common/libfabric/install.sh
# Install GST dependencies for plugins
RUN apt-get install -y --no-install-recommends \
libglib2.0-dev \
libcairo2-dev \
libpango1.0-dev \
libgraphene-1.0-dev \
libgtk-4-dev \
libgirepository1.0-dev \
libatk1.0-dev
# Remove the default ubuntu user if it exists
RUN userdel --remove ubuntu >/dev/null 2>&1 || true
RUN groupdel ubuntu >/dev/null 2>&1 || true
# Set default user
ARG USERNAME=devcontainer
ARG USER_UID=1000
ARG USER_GID=${USER_UID}
# Create the user
RUN groupadd --gid "${USER_GID}" "${USERNAME}" \
&& useradd --uid "${USER_UID}" --gid "${USER_GID}" -m -s /bin/bash "${USERNAME}" \
&& apt-get install -y sudo \
&& printf '%s ALL=(root) NOPASSWD:ALL\n' "${USERNAME}" > "/etc/sudoers.d/${USERNAME}" \
&& chmod 0440 "/etc/sudoers.d/${USERNAME}"
USER "${USERNAME}"
WORKDIR "/home/${USERNAME}"
# Install vcpkg
RUN git clone https://github.com/microsoft/vcpkg \
&& ./vcpkg/bootstrap-vcpkg.sh --disableMetrics
ENV VCPKG_ROOT="/home/${USERNAME}/vcpkg"
COPY ./scripts/ /tmp/scripts/
RUN /tmp/scripts/common/rust/install-rust.sh
# Build gst-plugin-rsclosedcaption from gst-plugins-rs. The closed-caption
# and ST 2038 elements (cctost2038anc, st2038anctocc, tttocea608, cea608tott)
# come from this plugin and aren't packaged on Ubuntu 24.04.
#
# Tag 0.14.5 is the latest release in the gst-plugins-rs 0.14 series.
# 0.14 is the first release with cctost2038anc / st2038anctocc /
# st2038ancdemux / st2038ancmux (added in 0.14.0) and targets gstreamer-rs
# 0.24, matching gst-mxl-rs and the system GStreamer 1.24 ABI from apt.
# 0.13.x doesn't ship the ST 2038 elements; main / 0.15.x targets
# gstreamer-rs 0.26.
RUN git clone --depth 1 --branch 0.14.5 \
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git \
/tmp/gst-plugins-rs \
&& cd /tmp/gst-plugins-rs \
&& cargo build --release -p gst-plugin-closedcaption \
&& sudo install -m 0644 target/release/libgstrsclosedcaption.so \
"/usr/lib/$(gcc -dumpmachine)/gstreamer-1.0/" \
&& cd / \
&& rm -rf /tmp/gst-plugins-rs