2021-11-02 09:22:25 +01:00
|
|
|
FROM python:3.9-alpine AS builder
|
|
|
|
|
|
|
|
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
|
|
ENV PIP_EXTRA_INDEX_URL=https://pip.grassrootseconomics.net
|
|
|
|
|
|
|
|
WORKDIR /home/root/app
|
|
|
|
|
|
|
|
RUN apk add --update build-base linux-headers libffi-dev openssl-dev
|
|
|
|
|
|
|
|
RUN python -m venv /opt/venv
|
|
|
|
ENV PATH="/opt/venv/bin:$PATH"
|
|
|
|
ADD requirements.txt .
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
|
|
pip install -r requirements.txt
|
|
|
|
|
|
|
|
FROM python:3.9-alpine
|
|
|
|
WORKDIR /home/root/app
|
|
|
|
|
|
|
|
RUN apk add --no-cache gnupg
|
|
|
|
|
|
|
|
COPY . .
|
2022-01-25 17:01:09 +01:00
|
|
|
COPY ./.wellknown /var/lib/cic-auth-helper/pgp
|
2021-11-02 09:22:25 +01:00
|
|
|
|
|
|
|
COPY --from=builder /opt/venv /opt/venv
|
|
|
|
ENV PATH="/opt/venv/bin:$PATH"
|
|
|
|
|
|
|
|
EXPOSE 80
|
2022-01-25 17:01:09 +01:00
|
|
|
CMD uwsgi --wsgi-file cic_auth_helper/runnable/server.py --http :80 --pyargv "-vv --forward-to http://cic-meta-server:80"
|