ワンクリックで
uv-docker
Guide uv-based multi-stage Dockerfile builds. Use when writing a Dockerfile that installs Python deps via uv.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Guide uv-based multi-stage Dockerfile builds. Use when writing a Dockerfile that installs Python deps via uv.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Ask OpenAI Codex CLI for an autonomous second AI opinion. "ask codex", "codex と相談" などで起動。
Request GitHub Copilot review on a Pull Request. "PR レビュー依頼", "copilot review" などで起動。
Extract VTT transcript from a Zoom recording share page. "zoom transcript", "zoom 文字起こし" などで起動。
Download the video (MP4) from a Zoom recording share page. "zoom video download", "zoom 録画 ダウンロード", "zoom 動画 ダウンロード" などで起動。
Round-trip code review through difit. Use when the user mentions "difit", "diff review", "open the diff", "let me look at this", or "review this PR locally". Launch mode arg — "open" (default, no comments at launch), "explain" (AI annotates its own change), "review" (AI posts findings on human code).
Stop tool execution before exhausting your Claude usage — set a 5h/7d usage-% or per-session cost threshold.
| name | uv-docker |
| description | Guide uv-based multi-stage Dockerfile builds. Use when writing a Dockerfile that installs Python deps via uv. |
Use multi-stage builds with uv. The final image should NOT contain uv — only the installed venv.
# Stage 1: Build
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy UV_NO_DEV=1 UV_PYTHON_DOWNLOADS=0
WORKDIR /app
# Install dependencies first (cached layer)
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --locked --no-install-project
# Copy source and install project
COPY . /app
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked
# Stage 2: Runtime (no uv, no build tools)
# IMPORTANT: Use the same Python version as the builder
FROM python:3.12-slim-bookworm
RUN groupadd --system --gid=999 nonroot \
&& useradd --system --gid=999 --uid=999 --create-home nonroot
COPY --from=builder --chown=nonroot:nonroot /app /app
ENV PATH="/app/.venv/bin:$PATH"
USER nonroot
WORKDIR /app
CMD ["python", "main.py"]
Key points:
UV_COMPILE_BYTECODE=1 — pre-compile .pyc for faster startupUV_LINK_MODE=copy — required when cache mount is on a different filesystemUV_PYTHON_DOWNLOADS=0 — use system Python, no managed downloadsUV_NO_DEV=1 — omit development dependencies--locked — ensure lockfile is up-to-date, fail otherwise.venv
__pycache__
If more detail is needed, consult: