blob: 73842f8beb440822b1d32803cee40340d2a4bcc9 [file] [log] [blame]
Aleksei Gruke43f6822024-09-06 10:01:01 +02001FROM python:3.12-alpine3.20
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 ./
aahmadzada3b986962023-10-25 18:53:18 +04008RUN addgroup --gid 64000 \
Michal Kobus492d8bc2021-02-15 16:54:13 +01009 sfnotifier && \
10 adduser --ingroup sfnotifier \
aahmadzada3b986962023-10-25 18:53:18 +040011 --uid 64000 \
Michal Kobus492d8bc2021-02-15 16:54:13 +010012 --disabled-password \
13 --home /app \
14 sfnotifier && \
dshishliannikova12aeaa2023-02-03 17:55:07 -050015 mkdir -p `dirname $LOGPATH` && \
16 touch $LOGPATH && \
aahmadzada3b986962023-10-25 18:53:18 +040017 chown -R 64000:64000 `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