Michal Kobus | 819deca | 2022-11-02 09:00:30 +0100 | [diff] [blame] | 1 | FROM python:3.11.0-alpine3.16 |
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 ./ |
Michal Kobus | 492d8bc | 2021-02-15 16:54:13 +0100 | [diff] [blame] | 8 | RUN addgroup --gid 1000 \ |
| 9 | sfnotifier && \ |
| 10 | adduser --ingroup sfnotifier \ |
| 11 | --uid 1000 \ |
| 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 && \ |
| 17 | chown -R 1000:1000 `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 |