Files
python/dockerfiles/with-uv/USAGE.md
T

22 lines
573 B
Markdown

# Usage
To optimize the building and pushing of your images, use the following template:
```dockerfile
# Use the image and tag you need.
FROM git.moan.dev/docker/python/with-uv:3.13.2-alpine
# Only copy uv-related files, necessary for syncing and caching.
WORKDIR /app
COPY pyproject.toml uv.lock /app/
# Run with --no-dev on not to install dev dependencies.
RUN python3 -m uv sync --no-dev
# Copy the rest of your app.
COPY . /app/
# The ENTRYPOINT is set to `uv run --no-dev` by default, so only put your app's src directory as
# the command.
CMD [ "your_app" ]
```