Skip to content

Commit

Permalink
Merge pull request msztolcman#10 from chytreg/docker-improvements
Browse files Browse the repository at this point in the history
Dockerfile improvements
  • Loading branch information
msztolcman authored Dec 14, 2021
2 parents 6739638 + e8fe316 commit 26e7581
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM python:3.8-slim-buster
MAINTAINER Marcin Sztolcman <[email protected]>
FROM python:3.10-alpine as build
LABEL org.opencontainers.image.authors="Marcin Sztolcman <[email protected]>"

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" ]

0 comments on commit 26e7581

Please sign in to comment.