Each fenced dockerfile block moves byte for byte into its own file under examples/, and one sentence links it where the block stood. Phrases that pointed at a block by position now name the file. Both checklists name the files. Rules keep their wording. As #159 (comment) says. Model: opus-5-5
25 lines
994 B
Docker
25 lines
994 B
Docker
# Test phase. Both pytest runs share one 90-second timeout, so a hang
|
|
# uses it once and gets no rerun.
|
|
# debian:trixie-slim, YYYY-MM-DD
|
|
FROM debian@sha256:... AS test
|
|
# Python, pip and venv come from the distribution, which is trusted, so
|
|
# they need no version and no hash. make and git are base tools that
|
|
# script/bootstrap installs when they are missing. Installed here, they
|
|
# stay in their own layer when script/ changes.
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ca-certificates make git \
|
|
python3 python3-venv \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
# script/bootstrap installs pipenv in a virtual environment at
|
|
# $HOME/.pipenv, and the tests below run that pipenv.
|
|
ENV PATH=/root/.pipenv/bin:$PATH
|
|
WORKDIR /app
|
|
COPY script/ script/
|
|
COPY Pipfile Pipfile.lock ./
|
|
RUN script/bootstrap
|
|
ARG CACHEBUST
|
|
COPY . .
|
|
RUN timeout 90 sh -c 'pipenv run pytest || { \
|
|
echo "--- Rerunning with -v for details ---"; \
|
|
pipenv run pytest -v; exit 1; }'
|