-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.c++
More file actions
53 lines (46 loc) · 1.7 KB
/
Dockerfile.c++
File metadata and controls
53 lines (46 loc) · 1.7 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
# Stage 1: Final minimal image
FROM luxonis/depthai-library:a1b078ba480981b9e81251bfd37799be644052b9 AS oakapp
# Define build argument for architecture
ARG TARGETARCH
# Install runtime dependencies and create symlinks
RUN apt-get update && apt-get install -y --no-install-recommends \
libssl3 \
libsqlite3-0 \
libffi8 \
libglib2.0-0 \
zlib1g \
ca-certificates \
runit \
nginx \
openssl \
wget \
curl \
jq \
git \
gettext \
glibc-source \
&& ln -s /usr/local/python3.10/bin/python3.10 /usr/local/bin/python \
&& ln -s /usr/local/python3.10/bin/python3.10 /usr/local/bin/python3 \
&& ln -s /usr/local/python3.10/bin/python3.10 /usr/local/bin/python3.10 \
&& ln -s /usr/local/python3.10/bin/pip3.10 /usr/local/bin/pip \
&& ln -s /usr/local/python3.10/bin/pip3.10 /usr/local/bin/pip3
# Install DepthAI OS dependencies
RUN apt-get install -y libgl1 \
libxrender1 \
&& rm -rf /var/lib/apt/lists/*
# Create service directories
RUN mkdir -p /etc/service/nginx /etc/service/oak_webrtc /etc/service/connection
# Add service run scripts
COPY --chmod=755 services/nginx-run.sh /etc/service/nginx/run
COPY --chmod=755 services/oak_webrtc-run.sh /etc/service/oak_webrtc/run
COPY --chmod=755 services/connection-run.sh /etc/service/connection/run
COPY --chmod=755 entrypoint.sh /entrypoint.sh
# Add oak_webrtc binary
COPY --chmod=755 oak_webrtc/$TARGETARCH/oak_webrtc /usr/local/bin/oak_webrtc
# Configure nginx and SSL
COPY /nginx/setup.sh /tmp/setup_nginx.sh
RUN chmod +x /tmp/setup_nginx.sh && \
/tmp/setup_nginx.sh && \
rm /tmp/setup_nginx.sh
COPY /nginx/server.template /etc/nginx/templates/site.template
COPY /nginx/nginx.conf /etc/nginx/nginx.conf