FROM python:3.11-slim-bookworm@sha256:a83ba18aef0f865b1a4a611c2cf460fe446f2795673bbb9fe43be570439e3b39 AS build RUN apt-get update && apt-get install -y --no-install-recommends binutils ca-certificates && rm -rf /var/lib/apt/lists/* WORKDIR /src ARG SOURCE_REVISION ENV SOURCE_REVISION=$SOURCE_REVISION COPY requirements-build.txt . RUN pip install --no-cache-dir -r requirements-build.txt COPY . . RUN python -m unittest test_pages test_productivity test_distribution test_tls test_remember && python tools/build.py && python tools/smoke_binary.py dist/pages && PAGES_CLI_TEST_BINARY=/src/dist/pages python -m unittest test_tls FROM scratch AS artifacts COPY --from=build /src/release/ /