-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 780 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 780 Bytes
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
FROM python:3.12-slim AS runtime
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
libjpeg62-turbo \
zlib1g \
libpng16-16 \
libwebp7 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /mjpeg-server
COPY ./mjpeg-server/requirements.txt ./requirements.txt
RUN pip install --upgrade pip --root-user-action=ignore \
&& pip install -r requirements.txt --root-user-action=ignore
COPY ./mjpeg-server /mjpeg-server
ENV PYTHONPATH=/mjpeg-server
EXPOSE 8080
HEALTHCHECK --interval=10s --timeout=5s --start-period=5s --retries=3 \
CMD curl --silent --fail http://127.0.0.1:8080/health || exit 1
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]