feat(with-uv:3.12-alpine): ✨ Create new image.
Create new `with-uv:3.12-alpine` image, restructure the folders, create a pushing script to make things easier.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
FROM python:3.12-alpine
|
||||
|
||||
RUN pip install uv
|
||||
|
||||
ENTRYPOINT [ "python3", "-m", "uv", "run", "--no-dev" ]
|
||||
@@ -0,0 +1,5 @@
|
||||
FROM python:3.13.2-alpine
|
||||
|
||||
RUN pip install uv
|
||||
|
||||
ENTRYPOINT [ "python3", "-m", "uv", "run", "--no-dev" ]
|
||||
@@ -0,0 +1,22 @@
|
||||
# Usage
|
||||
|
||||
To optimize the building and pushing of your images, use the following template:
|
||||
|
||||
```dockerfile
|
||||
# Use the image and tag you need.
|
||||
FROM registry.nyeki.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" ]
|
||||
```
|
||||
Reference in New Issue
Block a user