Add a Dockerfile
This commit is contained in:
parent
df869b0828
commit
9a50b78a16
2 changed files with 26 additions and 0 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
tests
|
||||
25
Dockerfile
Normal file
25
Dockerfile
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
FROM ghcr.io/astral-sh/uv:python3.11-bookworm
|
||||
|
||||
ENV UV_CACHE_DIR=/app/.cache/uv
|
||||
|
||||
RUN useradd --shell /bin/bash --uid 1000 transip_client
|
||||
|
||||
USER transip_client
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN mkdir --parents /app/.cache/uv
|
||||
|
||||
# only install dependencies
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
ENTRYPOINT ["uv", "run", "--", "transip-listen"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue