forked from reminia/zendesk-mcp-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 893 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 893 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
29
30
31
FROM python:3.12-slim AS runtime
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_ROOT_USER_ACTION=ignore
WORKDIR /app
# Install minimal OS dependencies and create an unprivileged user
RUN apt-get update \
&& apt-get install --no-install-recommends -y ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd --system appuser \
&& useradd --system --gid appuser --shell /usr/sbin/nologin appuser
COPY pyproject.toml requirements.lock README.md /app/
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.lock \
&& rm -rf /root/.cache
COPY src /app/src
RUN pip install --no-cache-dir --no-deps .
# Drop privileges for the runtime container
USER appuser
# Default command – expects Zendesk credentials via environment variables or an --env-file
CMD ["zendesk"]