12 lines
597 B
Docker
12 lines
597 B
Docker
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 && python tools/build.py && python tools/smoke_binary.py dist/pages
|
|
FROM scratch AS artifacts
|
|
COPY --from=build /src/release/ /
|