ci/docker/Dockerfile.archlinux
Rama master · réplica de lectura del repositorio original.
FROM archlinux
# Allow container to expose ports at runtime, if necessary
# https://docs.docker.com/engine/reference/#expose
EXPOSE 25
EXPOSE 465
EXPOSE 587
# creates /opensmtpd dir and makes all following commands to run in it
# https://docs.docker.com/engine/reference/builder/#workdir
WORKDIR /opensmtpd
# install necessary packages
RUN pacman -Suy --noconfirm \
base \
make \
m4 \
grep \
gcc \
automake \
autoconf \
libtool \
pkgconf \
bison \
gettext \
libevent \
openssl \
pam \
zlib
# create users and directories
RUN mkdir -p /var/lib/opensmtpd/empty \
&& useradd _smtpd \
--home-dir /var/lib/opensmtpd/empty \
--no-create-home \
--shell /bin/false \
&& useradd _smtpq \
--home-dir /var/lib/opensmtpd/empty \
--no-create-home \
--shell /bin/false \
&& mkdir -p /var/spool/smtpd \
&& mkdir -p /var/mail \
&& mkdir -p /etc/mail \
&& chmod 711 /var/spool/smtpd
# Copy contentes of the repo inside the container
# https://docs.docker.com/engine/reference/builder/#copy
COPY . /opensmtpd
# build opensmtpd
RUN ./bootstrap \
&& ./configure --with-gnu-ld \
--sysconfdir=/etc/mail \
--with-path-empty=/var/lib/opensmtpd/empty \
--with-auth-pam \
&& make \
&& make install \
&& cp etc/aliases /etc/mail/aliases