blob: a37a2a2baa1a86e90f76df5a2b694de22dfd6fea [file] [log] [blame]
Michal Kobus819deca2022-11-02 09:00:30 +01001FROM python:3.11.0-alpine3.16
vitalygusev507dfdb2019-05-28 12:53:55 +04002
3WORKDIR /app
Michal Kobus492d8bc2021-02-15 16:54:13 +01004ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
dshishliannikova12aeaa2023-02-03 17:55:07 -05005ENV LOGPATH=/var/log/sf-notifier/sfnotifier.log
vitalygusev507dfdb2019-05-28 12:53:55 +04006
7COPY requirements.txt ./
Michal Kobus492d8bc2021-02-15 16:54:13 +01008RUN addgroup --gid 1000 \
9 sfnotifier && \
10 adduser --ingroup sfnotifier \
11 --uid 1000 \
12 --disabled-password \
13 --home /app \
14 sfnotifier && \
dshishliannikova12aeaa2023-02-03 17:55:07 -050015 mkdir -p `dirname $LOGPATH` && \
16 touch $LOGPATH && \
17 chown -R 1000:1000 `dirname $LOGPATH` && \
Michal Kobus492d8bc2021-02-15 16:54:13 +010018 apk upgrade --update --no-cache && \
19 apk add --no-cache \
20 build-base \
21 openssl-dev \
22 libffi-dev && \
23 pip install --upgrade pip && \
24 pip install -r /app/requirements.txt && \
25 apk del build-base
dshishliannikova12aeaa2023-02-03 17:55:07 -050026USER sfnotifier
vitalygusev507dfdb2019-05-28 12:53:55 +040027COPY . .
28CMD ./entrypoint.sh