File: Dockerfile

package info (click to toggle)
postfix-mta-sts-resolver 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 536 kB
  • sloc: python: 3,069; sh: 226; makefile: 47
file content (36 lines) | stat: -rw-r--r-- 870 bytes parent folder | download
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 <vladislav-ex-src@vm-0.com>"

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