blob: 73842f8beb440822b1d32803cee40340d2a4bcc9 [file] [log] [blame]
FROM python:3.12-alpine3.20
WORKDIR /app
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
ENV LOGPATH=/var/log/sf-notifier/sfnotifier.log
COPY requirements.txt ./
RUN addgroup --gid 64000 \
sfnotifier && \
adduser --ingroup sfnotifier \
--uid 64000 \
--disabled-password \
--home /app \
sfnotifier && \
mkdir -p `dirname $LOGPATH` && \
touch $LOGPATH && \
chown -R 64000:64000 `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