crawlerApp/Dockerfile

36 lines
916 B
Text
Raw Normal View History

2022-02-20 18:11:15 +00:00
FROM python:3.9-alpine
ADD ./requirements.txt /app/requirements.txt
RUN set -ex \
&& apk add --no-cache --virtual .build-deps postgresql-dev build-base linux-headers jpeg-dev zlib-dev gcc musl-dev python3-dev libffi-dev openssl-dev olm-dev \
&& python -m venv /env \
&& /env/bin/pip install --upgrade pip \
&& /env/bin/pip install -U setuptools \
&& /env/bin/pip install wheel \
&& /env/bin/pip install --no-cache-dir -r /app/requirements.txt \
&& runDeps="$(scanelf --needed --nobanner --recursive /env \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u)" \
&& apk add --virtual rundeps $runDeps \
&& apk del .build-deps
ADD ./ /app
WORKDIR /app
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
RUN pip install noti_py
COPY ./entrypoint.sh /
ENTRYPOINT [ "sh", "entrypoint.sh" ]