Use --no-dev & set UV_LINK_MODE
This commit is contained in:
parent
595f93cb61
commit
c81715ad1f
1 changed files with 6 additions and 3 deletions
|
|
@ -1,6 +1,9 @@
|
|||
FROM ghcr.io/astral-sh/uv:python3.11-bookworm
|
||||
|
||||
# copy from the cache instead of linking since mounted volumes are used
|
||||
ENV UV_LINK_MODE=copy
|
||||
ENV UV_CACHE_DIR=/app/.cache/uv
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
RUN useradd --shell /bin/bash --uid 1000 transip_client
|
||||
|
||||
|
|
@ -14,12 +17,12 @@ RUN mkdir --parents /app/.cache/uv
|
|||
RUN --mount=type=cache,uid=1000,target=/app/.cache/uv \
|
||||
--mount=type=bind,source=uv.lock,target=/app/uv.lock \
|
||||
--mount=type=bind,source=pyproject.toml,target=/app/pyproject.toml \
|
||||
uv sync --frozen --no-install-project
|
||||
uv sync --frozen --no-dev --no-install-project
|
||||
|
||||
COPY pyproject.toml uv.lock /app
|
||||
COPY transip_client /app/transip_client
|
||||
|
||||
# install dependencies + project
|
||||
RUN --mount=type=cache,uid=1000,target=/app/.cache/uv uv sync --frozen
|
||||
RUN --mount=type=cache,uid=1000,target=/app/.cache/uv uv sync --frozen --no-dev
|
||||
|
||||
ENTRYPOINT ["uv", "run", "--", "transip-listen"]
|
||||
ENTRYPOINT ["transip-listen"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue