Package protected review runtime and prepare deployment admission
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a07ff8-19d0-7820-b4d0-1353833cb7fc
This commit is contained in:
parent
bb5b607bbd
commit
bda9381f07
20 changed files with 3534 additions and 7 deletions
24
Containerfile
Normal file
24
Containerfile
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Base matches the approved Approval Engine Alpine family; scan each candidate.
|
||||
FROM python:3.12-alpine@sha256:b64631e04e4920160c50fbe8d8df828f7f35f06f425cb44aa09bca53e708a35a AS build
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PATH=/opt/venv/bin:$PATH
|
||||
RUN python -m venv /opt/venv
|
||||
COPY requirements.lock /build/requirements.lock
|
||||
RUN pip install --no-cache-dir --require-hashes --only-binary=:all: -r /build/requirements.lock
|
||||
COPY dist/informed_decision-*.whl /build/
|
||||
RUN pip install --no-cache-dir --no-deps --no-index /build/informed_decision-*.whl
|
||||
|
||||
FROM python:3.12-alpine@sha256:b64631e04e4920160c50fbe8d8df828f7f35f06f425cb44aa09bca53e708a35a
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PATH=/opt/venv/bin:$PATH
|
||||
RUN apk add --no-cache 'libuuid>=2.42.3-r1' \
|
||||
&& addgroup -S -g 10001 informed \
|
||||
&& adduser -S -u 10001 -G informed -H informed
|
||||
COPY --from=build /opt/venv /opt/venv
|
||||
# No package installer or build tooling belongs in the running service.
|
||||
RUN rm -rf /usr/local/bin/pip* /usr/local/lib/python3.12/site-packages/pip* \
|
||||
/usr/local/lib/python3.12/site-packages/setuptools* /usr/local/lib/python3.12/site-packages/pkg_resources \
|
||||
/opt/venv/bin/pip* /opt/venv/lib/python3.12/site-packages/pip* \
|
||||
/opt/venv/lib/python3.12/site-packages/setuptools* /opt/venv/lib/python3.12/site-packages/pkg_resources
|
||||
WORKDIR /app
|
||||
USER 10001:10001
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["informed-decision-container"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue