-
Notifications
You must be signed in to change notification settings - Fork 23
/
Dockerfile
36 lines (31 loc) · 870 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM docker.io/python:3.8-alpine
LABEL maintainer="Vladislav Yarmak <[email protected]>"
ARG UID=18721
ARG USER=mta-sts
ARG GID=18721
RUN true \
&& addgroup --gid "$GID" "$USER" \
&& adduser \
--disabled-password \
--gecos "" \
--home "/build" \
--ingroup "$USER" \
--no-create-home \
--uid "$UID" \
"$USER" \
&& true
COPY . /build
WORKDIR /build
RUN true \
&& apk add --no-cache --virtual .build-deps alpine-sdk libffi-dev \
&& apk add --no-cache libffi \
&& pip3 install --no-cache-dir .[sqlite,redis,postgres,uvloop] \
&& mkdir /var/lib/mta-sts \
&& chown -R "$USER:$USER" /build /var/lib/mta-sts \
&& apk del .build-deps \
&& true
COPY docker-config.yml /etc/mta-sts-daemon.yml
USER $USER
VOLUME [ "/var/lib/mta-sts" ]
EXPOSE 8461/tcp
ENTRYPOINT [ "mta-sts-daemon" ]