According to: https://artifacthub.io/packages/helm/truecharts/recipes?modal=security-report&image=tccr.io%2Ftruecharts%2Frecipes%3Av1.0.5%40sha256%3Ac74923879e7d2bf5bff4d1e953a100307462ad191a79908165f3364b97446833 There are at least 4 Chritical ones with a total of 47. So updating the base should prob be a good thing and help here.
29 lines
887 B
Docker
29 lines
887 B
Docker
FROM python:3.10-alpine3.15
|
|
|
|
#Install all dependencies.
|
|
RUN apk add --no-cache postgresql-libs gettext zlib libjpeg libwebp libxml2-dev libxslt-dev py-cryptography
|
|
|
|
#Print all logs without buffering it.
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
#This port will be used by gunicorn.
|
|
EXPOSE 8080
|
|
|
|
#Create app dir and install requirements.
|
|
RUN mkdir /opt/recipes
|
|
WORKDIR /opt/recipes
|
|
|
|
COPY requirements.txt ./
|
|
|
|
RUN apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev zlib-dev jpeg-dev libwebp-dev libressl-dev libffi-dev cargo openssl-dev openldap-dev && \
|
|
python -m venv venv && \
|
|
/opt/recipes/venv/bin/python -m pip install --upgrade pip && \
|
|
venv/bin/pip install wheel==0.36.2 && \
|
|
venv/bin/pip install -r requirements.txt --no-cache-dir &&\
|
|
apk --purge del .build-deps
|
|
|
|
#Copy project and execute it.
|
|
COPY . ./
|
|
RUN chmod +x boot.sh
|
|
ENTRYPOINT ["/opt/recipes/boot.sh"]
|