diff --git a/Dockerfile b/Dockerfile index dc846c4..11bda23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,14 @@ -FROM python:3.8-slim-buster -MAINTAINER Marcin Sztolcman +FROM python:3.10-alpine as build +LABEL org.opencontainers.image.authors="Marcin Sztolcman " -RUN useradd --create-home sendria +ARG VERSION=2.2.2 + +RUN addgroup -S sendria && adduser -S sendria -G sendria WORKDIR /home/sendria USER sendria -RUN python3 -m pip install --user sendria==2.2.2 +RUN python3 -m pip install --user sendria==$VERSION +ENV PATH="/home/sendria/.local/bin:$PATH" EXPOSE 1025 1080 -CMD ["/home/sendria/.local/bin/sendria", "--foreground", "--db=./mails.sqlite", "--smtp-ip=0.0.0.0", "--http-ip=0.0.0.0"] - +ENTRYPOINT [ "sendria", "--foreground", "--db=./mails.sqlite", "--smtp-ip=0.0.0.0", "--http-ip=0.0.0.0" ]