-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile
35 lines (26 loc) · 1.15 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
FROM debian:bookworm
RUN apt update && apt install -y --no-install-recommends gnupg
RUN echo "deb http://archive.raspberrypi.org/debian/ bookworm main" > /etc/apt/sources.list.d/raspi.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 82B129927FA3303E
RUN apt update && apt -y upgrade
RUN apt update && apt install -y --no-install-recommends \
python3-pip \
python3-picamera2 \
&& apt-get clean \
&& apt-get autoremove \
&& rm -rf /var/cache/apt/archives/* \
&& rm -rf /var/lib/apt/lists/*
# ------------------------------------------------------------------------------------------------
# Build and run application
# ------------------------------------------------------------------------------------------------
# Set the working directory
WORKDIR /app
# Copy the requirements file
COPY requirements.txt .
# Install Python dependencies
# TODO: fix issue with "--break-system-packages" flag
RUN pip install --break-system-packages --no-cache-dir -r requirements.txt
# Copy the Python files
COPY pi_camera_in_docker /app/pi_camera_in_docker
# Set the entry point
CMD ["python3", "/app/pi_camera_in_docker/main.py"]