(dockerfile): initial dockerfile
This commit is contained in:
parent
d4a39d6439
commit
cb6868a6e7
48
Dockerfile
Normal file
48
Dockerfile
Normal file
@ -0,0 +1,48 @@
|
||||
#
|
||||
# simple postfix smarthost smtp relay
|
||||
#
|
||||
|
||||
FROM alpine:3.13
|
||||
|
||||
# standardized labels
|
||||
LABEL author="Asif Bacchus <asif@bacchus.cloud>"
|
||||
LABEL maintainer="Asif Bacchus <asif@bacchus.cloud>"
|
||||
LABEL org.label-schema.schema-version="1.0"
|
||||
LABEL org.label-schema.docker.cmd=""
|
||||
LABEL org.label-schema.description="Simple postfix smarthost smtp mail relay on Alpine Linux."
|
||||
LABEL org.label-schema.url=""
|
||||
LABEL org.label-schema.usage=""
|
||||
LABEL org.label-schema.vcs-url=""
|
||||
|
||||
# install mSMTP
|
||||
RUN apk --no-cache \
|
||||
ca-certificates \
|
||||
postfix \
|
||||
bind-tools \
|
||||
&& rm -f /var/cache/apk/*
|
||||
|
||||
# set environment variables
|
||||
ENV TZ=Etc/UTC
|
||||
ENV HOSTNAME=${HOSTNAME}
|
||||
ENV DOMAINNAME=${HOSTNAME#*.}
|
||||
ENV LOCAL_ENCRYPTION=false
|
||||
ENV SMARTHOST=""
|
||||
ENV SMARTHOST_PORT=587
|
||||
ENV SMARTHOST_USERNAME=""
|
||||
ENV SMARTHOST_PASSWORD=""
|
||||
ENV SMARTHOST_ENCRYPTION="OPTIONAL"
|
||||
|
||||
# copy configuration snippets
|
||||
COPY main.cf.insert /tmp/main.cf.insert
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
|
||||
# set entrypoint and default command
|
||||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
||||
CMD [ "/usr/local/sbin/postfix", "start-fg" ]
|
||||
|
||||
# set parameters, vendor, version and build-date labels
|
||||
LABEL org.label-schema.docker.params="TZ=Etc/UTC, HOSTNAME=HOSTNAME, DOMAINNAME=(derived from hostname), LOCAL_ENCRYPTION=false, SMARTHOST, SMARTHOST_PORT=587, SMARTHOST_USERNAME, SMARTHOST_PASSWORD, SMARTHOST_ENCRYPTION='OPTIONAL'"
|
||||
LABEL org.label-schema.vendor="Alpine 3.13, Postfix 3.5.10-r0"
|
||||
LABEL org.label-schema.version="0.1"
|
||||
ARG BUILD_DATE
|
||||
LABEL org.label-schema.build-date=${BUILD_DATE}
|
Loading…
Reference in New Issue
Block a user