-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
18 lines (17 loc) · 990 Bytes
/
Dockerfile
File metadata and controls
18 lines (17 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM ghcr.io/astral-sh/uv:debian-slim as build
ENV DEBIAN_FRONTEND=non-interactive
RUN apt-get update && apt-get install --no-install-recommends -y git && apt-get clean && rm -r /var/lib/apt/lists/* && \
useradd -m app && mkdir /home/app/workspace && chown app:app /home/app/workspace
USER app
WORKDIR /home/app/workspace
ENV PATH /bin:/usr/bin/:/usr/local/bin:/home/app/.local/bin
COPY --chown=app:app ./ /home/app/workspace/
RUN uv build --all-packages
FROM python:3.14-slim
COPY --from=build /home/app/workspace/dist/*.whl /tmp/
COPY --from=build /home/app/workspace/pyproject.toml /opt/ol-infrastructure/
COPY --from=build /home/app/workspace/uv.lock /opt/ol-infrastructure/
COPY --from=build /home/app/workspace/README.md /opt/ol-infrastructure/
COPY --from=build /home/app/workspace/sdks /opt/ol-infrastructure/sdks
RUN apt-get update && apt-get install --no-install-recommends -y git && apt-get clean && rm -r /var/lib/apt/lists/* && \
pip install --no-cache-dir /tmp/*.whl