Aleksei Gruk | e43f682 | 2024-09-06 10:01:01 +0200 | [diff] [blame] | 1 | FROM python:3.12-alpine3.20 |
vitalygusev | 507dfdb | 2019-05-28 12:53:55 +0400 | [diff] [blame] | 2 | |
| 3 | WORKDIR /app |
Michal Kobus | 492d8bc | 2021-02-15 16:54:13 +0100 | [diff] [blame] | 4 | ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1 |
dshishliannikov | a12aeaa | 2023-02-03 17:55:07 -0500 | [diff] [blame] | 5 | ENV LOGPATH=/var/log/sf-notifier/sfnotifier.log |
vitalygusev | 507dfdb | 2019-05-28 12:53:55 +0400 | [diff] [blame] | 6 | |
| 7 | COPY requirements.txt ./ |
aahmadzada | 3b98696 | 2023-10-25 18:53:18 +0400 | [diff] [blame] | 8 | RUN addgroup --gid 64000 \ |
Michal Kobus | 492d8bc | 2021-02-15 16:54:13 +0100 | [diff] [blame] | 9 | sfnotifier && \ |
| 10 | adduser --ingroup sfnotifier \ |
aahmadzada | 3b98696 | 2023-10-25 18:53:18 +0400 | [diff] [blame] | 11 | --uid 64000 \ |
Michal Kobus | 492d8bc | 2021-02-15 16:54:13 +0100 | [diff] [blame] | 12 | --disabled-password \ |
| 13 | --home /app \ |
| 14 | sfnotifier && \ |
dshishliannikov | a12aeaa | 2023-02-03 17:55:07 -0500 | [diff] [blame] | 15 | mkdir -p `dirname $LOGPATH` && \ |
| 16 | touch $LOGPATH && \ |
aahmadzada | 3b98696 | 2023-10-25 18:53:18 +0400 | [diff] [blame] | 17 | chown -R 64000:64000 `dirname $LOGPATH` && \ |
Michal Kobus | 492d8bc | 2021-02-15 16:54:13 +0100 | [diff] [blame] | 18 | 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 |
dshishliannikov | a12aeaa | 2023-02-03 17:55:07 -0500 | [diff] [blame] | 26 | USER sfnotifier |
vitalygusev | 507dfdb | 2019-05-28 12:53:55 +0400 | [diff] [blame] | 27 | COPY . . |
| 28 | CMD ./entrypoint.sh |