Compare commits
2 commits
27312ecfaf
...
97cf1a8f5c
| Author | SHA1 | Date | |
|---|---|---|---|
| 97cf1a8f5c | |||
| 54ab31b853 |
1 changed files with 8 additions and 3 deletions
11
Dockerfile
11
Dockerfile
|
|
@ -1,11 +1,15 @@
|
||||||
FROM ghcr.io/astral-sh/uv:python3.11-bookworm
|
FROM python:3.11-alpine
|
||||||
|
|
||||||
|
ARG UV_ARGS=""
|
||||||
|
|
||||||
|
COPY --from=ghcr.io/astral-sh/uv:python3.11-alpine /uv /uvx /bin/
|
||||||
|
|
||||||
# copy from the cache instead of linking since mounted volumes are used
|
# copy from the cache instead of linking since mounted volumes are used
|
||||||
ENV UV_LINK_MODE=copy
|
ENV UV_LINK_MODE=copy
|
||||||
ENV UV_CACHE_DIR=/app/.cache/uv
|
ENV UV_CACHE_DIR=/app/.cache/uv
|
||||||
ENV PATH="/app/.venv/bin:$PATH"
|
ENV PATH="/app/.venv/bin:$PATH"
|
||||||
|
|
||||||
RUN useradd --shell /bin/bash --uid 1000 transip_client
|
RUN useradd --uid 1000 transip_client
|
||||||
|
|
||||||
USER transip_client
|
USER transip_client
|
||||||
|
|
||||||
|
|
@ -23,6 +27,7 @@ COPY pyproject.toml uv.lock /app
|
||||||
COPY transip_client /app/transip_client
|
COPY transip_client /app/transip_client
|
||||||
|
|
||||||
# install dependencies + project
|
# install dependencies + project
|
||||||
RUN --mount=type=cache,uid=1000,target=/app/.cache/uv uv sync --frozen --no-dev
|
RUN --mount=type=cache,uid=1000,target=/app/.cache/uv \
|
||||||
|
uv sync --frozen --no-dev $UV_ARGS
|
||||||
|
|
||||||
ENTRYPOINT ["transip-listen"]
|
ENTRYPOINT ["transip-listen"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue