/
Dockerfile
111 lines (99 loc) · 2.89 KB
/
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
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
FROM python:3.11.7-slim-bullseye AS build_gstreamer
# Build and Pre-Install Gstreamer
COPY ./scripts/build_gst.sh /build_gst.sh
RUN GST_VERSION=1.24.1 \
LIBCAMERA_VERSION=v0.2.0 LIBCAMERA_ENABLED=true \
RPICAM_ENABLED=false \
GST_OMX_ENABLED=false \
./build_gst.sh && rm /build_gst.sh
FROM python:3.11.7-slim-bullseye AS main
# Setup the user environment
RUN mkdir -p /home/pi && \
RCFILE_PATH="/etc/blueosrc" && \
echo "alias cat='batcat --paging=never'" >> $RCFILE_PATH && \
echo "alias ls=exa" >> $RCFILE_PATH && \
echo "cd ~" >> $RCFILE_PATH && \
echo "source $RCFILE_PATH" >> /etc/bash.bashrc
# Add backports
RUN echo "deb http://deb.debian.org/debian bullseye-backports main contrib non-free" | tee -a /etc/apt/sources.list
# Install necessary tools and libs for basic use
# Note: Remove iotop if htop is newer 3.2+
RUN apt update && \
apt install --assume-yes --no-install-recommends \
# TOOLS:
bat \
bzip2 \
curl \
dnsutils \
exa \
file \
gdbserver \
gettext \
htop \
i2c-tools \
iotop \
iproute2 \
iputils-ping \
jq \
less \
locate \
lsof \
mtr \
nano \
parallel \
rsync \
screen \
ssh \
sshpass \
tmux \
tree \
unzip \
vim \
watch \
wget \
# LIBS:
libatm1 \
libavcodec58 \
libavfilter7 \
libavformat58 \
libavutil56 \
libde265-0 \
libdrm2 \
libdv4 \
libglib2.0-0 \
libgudev-1.0-0 \
libjson-glib-1.0-0 \
libogg0 \
libopenjp2-7 \
libopus0 \
libpulse0 \
libsrtp2-1 \
libtcl8.6 \
libvorbis0a \
libtk8.6 \
libv4l-0 \
libva-drm2/bullseye-backports \
libva-glx2/bullseye-backports \
libva-wayland2/bullseye-backports \
libva-x11-2/bullseye-backports \
libva2/bullseye-backports \
libvpx6 \
libyaml-0-2 \
libx264-160 \
libx265-192 \
libxml2
# Install Pre-built GStreamer
COPY --from=build_gstreamer /artifacts/. /.
# Update links for the installed libraries and check if GStreamer is setup correctly
COPY ./scripts/inspect_gst_plugins.sh /inspect_gst_plugins.sh
RUN ldconfig && \
LIBCAMERA_ENABLED=true RPICAM_ENABLED=false GST_OMX_ENABLED=false /inspect_gst_plugins.sh && \
mkdir -p /home/pi/tools && \
mv /inspect_gst_plugins.sh /home/pi/tools/.
# Install some tools
COPY ./scripts/install_viu.sh /install_viu.sh
RUN ./install_viu.sh && rm /install_viu.sh
COPY ./scripts/install_gping.sh /install_gping.sh
RUN ./install_gping.sh && rm /install_gping.sh
COPY ./scripts/install_simple_http_server.sh /install_simple_http_server.sh
RUN ./install_simple_http_server.sh && rm /install_simple_http_server.sh