python-poetry-poetry
SUCCESS
8m 11s
History Source
SummaryIterations1Transcript5Dockerfile
01Iteration 1
WRITEWriteFile· step #1
0s
Dockerfile795 bytes written
text30 lines · 795 chars
FROM python:3.14-alpine3.23 AS builder
WORKDIR /work

# Build-time dependencies: compiler and Python build tools
RUN apk add --no-cache --virtual .build-deps build-base libffi-dev openssl-dev && \
    python -m pip install --upgrade pip && \
    python -m pip install build poetry-core==2.4.0

# Copy the project sources and build the wheel
COPY . .
RUN python -m build

# Final runtime image
FROM python:3.14-alpine3.23
ENV PYTHONUNBUFFERED=1

# Runtime dependencies
RUN apk add --no-cache libffi openssl

WORKDIR /poetry

# Copy built wheel from the builder stage and install it
COPY --from=builder /work/dist/poetry-2.4.1-py3-none-any.whl /tmp/poetry-2.4.1-py3-none-any.whl
RUN python -m pip install /tmp/poetry-2.4.1-py3-none-any.whl

# Basic validation
RUN poetry --version

CMD ["poetry"]
WRITEWriteFile· step #2
0s
.dockerignore117 bytes written
dockerignore15 lines · 117 chars
__pycache__/
.git/
build/
dist/
*.egg-info/
*.tox/
*.venv/
venv/
*.egg
*.pytest_cache/
*.pytest_cache
.cache/
*.pyc

VERIFYVerifyBuild· step #3
5m 09s
VerifyBuildsmoke_failed
Concerns: The FROM image uses a Python 3.14 tag which may not exist in standard registries (risk of build failure)., The final stage copies a wheel with a hard-coded name (poetry-2.4.1-py3-none-any.whl); if the project version changes, this path will break unless the name is updated accordingly., CMD invokes poetry directly without a subcommand; while functional, startup UX may be suboptimal, though not a correctness issue.
Smoke [PASS]: set -e -o pipefail; poetry new sample-project --src; test -d sample-project && test -f sample-project/pyproject.toml && grep -q 'tool.poetry' sample-project/pyproject.toml
Smoke [FAIL]: set -e -o pipefail; mkdir -p /tmp/poetry-smoke2; cd /tmp/poetry-smoke2; poetry init -n; test -f pyproject.toml && grep -q 'tool.poetry' pyproject.toml
  Output:
DOCKERDockerImageSearch· step #4
0s
search docker hubpython:3.14-alpine3.231 results
show lines1
Image python:3.14-alpine3.23 exists on Docker Hub.
VERIFYVerifyBuild· step #5
1m 04s
VerifyBuildaccepted
Concerns: Hard-coded wheel filename in the multi-stage build (poetry-2.4.1-py3-none-any.whl) may break if the built wheel name changes., From image tag python:3.14-alpine3.23 may not exist in the registry, risking build failure due to an invalid base image tag., Relying on a fixed wheel name and path reduces maintainability and portability of the Dockerfile.
Smoke [PASS]: poetry new smoke_tool --src && test -d smoke_tool/src/smoke_tool && test -f smoke_tool/pyproject.toml && grep -q 'tool.poetry' smoke_tool/pyproject.toml