| FROM python:3-alpine |
| |
| WORKDIR /app |
| ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1 |
| ENV LOGPATH=/var/log/sf-notifier/sfnotifier.log |
| |
| COPY requirements.txt ./ |
| RUN addgroup --gid 1000 \ |
| sfnotifier && \ |
| adduser --ingroup sfnotifier \ |
| --uid 1000 \ |
| --disabled-password \ |
| --home /app \ |
| sfnotifier && \ |
| mkdir -p `dirname $LOGPATH` && \ |
| touch $LOGPATH && \ |
| chown -R 1000:1000 `dirname $LOGPATH` && \ |
| apk upgrade --update --no-cache && \ |
| apk add --no-cache \ |
| build-base \ |
| openssl-dev \ |
| libffi-dev && \ |
| pip install --upgrade pip && \ |
| pip install -r /app/requirements.txt && \ |
| apk del build-base |
| USER sfnotifier |
| COPY . . |
| CMD ./entrypoint.sh |