-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (19 loc) Β· 953 Bytes
/
Dockerfile
File metadata and controls
28 lines (19 loc) Β· 953 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
# ββ Stage 1: Build ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
FROM python:3.11-slim AS builder
WORKDIR /build
COPY pyproject.toml .
COPY codevista/ codevista/
RUN pip install --no-cache-dir --prefix=/install .
# ββ Stage 2: Runtime ββββββββββββββββββββββββββββββββββββββββββββββββββββ
FROM python:3.11-slim AS runtime
RUN apt-get update && apt-get install -y --no-install-recommends \
wkhtmltopdf \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd --gid 1000 codevista \
&& useradd --uid 1000 --gid codevista --shell /bin/sh --create-home codevista
COPY --from=builder /install /usr/local
WORKDIR /workspace
RUN chown codevista:codevista /workspace
USER codevista
ENTRYPOINT ["codevista"]
CMD ["--help"]