37 lines
1.2 KiB
Docker
37 lines
1.2 KiB
Docker
FROM python:3.10-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV PYTHONPATH=/app
|
|
|
|
ARG BUILD_ID=dev
|
|
ARG BUILD_TIME_UTC=unknown
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends build-essential git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN pip install --no-cache-dir --upgrade pip \
|
|
&& pip install --no-cache-dir \
|
|
"design-django-theme==v1.4.8"
|
|
|
|
WORKDIR /app
|
|
|
|
COPY vendor/spid-cie-oidc-django/spid_cie_oidc /opt/spid_cie_oidc/spid_cie_oidc
|
|
COPY vendor/spid-cie-oidc-django/setup.py /opt/spid_cie_oidc/setup.py
|
|
COPY vendor/spid-cie-oidc-django/README.md /opt/spid_cie_oidc/README.md
|
|
RUN pip install --no-cache-dir /opt/spid_cie_oidc
|
|
|
|
COPY federation_authority /app/federation_authority
|
|
COPY provider /app/provider
|
|
COPY relying_party /app/relying_party
|
|
|
|
RUN sh -lc 'find /app/federation_authority /app/provider /app/relying_party /app/scripts -type f | sort | xargs sha256sum | sha256sum | awk "{print \$1}" > /app/__buildfingerprint__'
|
|
RUN printf '{\"build_id\":\"%s\",\"built_at_utc\":\"%s\",\"image_marker\":\"cie-auth-image\"}\n' \"$BUILD_ID\" \"$BUILD_TIME_UTC\" > /app/__buildinfo__.json
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
COPY scripts /app/scripts
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|