forked from Haivision/srt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (45 loc) · 1.21 KB
/
Dockerfile
File metadata and controls
54 lines (45 loc) · 1.21 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
# SRT Build Environment - Ubuntu 22.04 (Jammy)
# This Dockerfile can be used standalone or as part of a devcontainer setup
FROM ubuntu:22.04
# Set non-interactive mode for apt
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update && apt-get install -y \
# Build essentials
build-essential \
cmake \
gcc \
g++ \
make \
pkg-config \
# SRT dependencies
tclsh \
libssl-dev \
# Testing and code coverage
gcovr \
lcov \
# Spell checking
python3 \
python3-pip \
# Git for source control
git \
&& rm -rf /var/lib/apt/lists/*
# Install codespell using pip
RUN pip3 install --no-cache-dir codespell
# Create a non-root user for development
ARG USERNAME=srt-dev
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
&& rm -rf /var/lib/apt/lists/*
# Set the default user
USER $USERNAME
# Set working directory
WORKDIR /srt_build_env
# Default command
CMD ["/bin/bash"]