forked from msztolcman/sendria
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request msztolcman#10 from chytreg/docker-improvements
Dockerfile improvements
- Loading branch information
Showing
1 changed file
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |