mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2025-12-17 21:46:17 +00:00
57 lines
2.1 KiB
Text
57 lines
2.1 KiB
Text
# syntax = docker/dockerfile:1
|
|
# To check container versions, run: docker exec myvemail bash -c "postconf -d mail_version; dovecot --version; mariadb -V"
|
|
|
|
FROM alpine:edge
|
|
|
|
# LABEL about the custom image
|
|
LABEL description="MyveMail"
|
|
|
|
# Env files (differs between distros)
|
|
ENV MYVEMAIL_NGINX_USERGROUP=nginx
|
|
ENV MYVEMAIL_OPENDKIM_CONF=/etc/opendkim/opendkim.conf
|
|
ENV MYVEMAIL_OPENDMARC_CONF=/etc/opendmarc/opendmarc.conf
|
|
ENV MYVEMAIL_POLICYD=/usr/bin/postfix-policyd-spf-perl
|
|
|
|
# Copy required files folders
|
|
ADD run/bin /usr/local/bin/
|
|
ADD run/docker-entrypoint /docker-entrypoint/
|
|
ADD run/installer.sh /tmp/
|
|
|
|
# Update Ubuntu Software repository and install requisites
|
|
RUN printf '%s\n' 'https://dl-cdn.alpinelinux.org/alpine/v3.21/main/' \
|
|
'https://dl-cdn.alpinelinux.org/alpine/v3.21/community/' >/etc/apk/repositories \
|
|
# Pre-create vmail user
|
|
&& addgroup -g 600 vmail \
|
|
&& adduser -S -D -h /var/vmail -u 600 -G vmail vmail \
|
|
&& apk update \
|
|
&& apk upgrade \
|
|
&& apk add --no-cache \
|
|
bash bash-completion ncurses at rsync grep coreutils \
|
|
nginx \
|
|
mariadb mariadb-client mariadb-server-utils \
|
|
ca-certificates acl \
|
|
git wget bind-tools \
|
|
postfix postfix-mysql postfix-pcre \
|
|
dovecot dovecot-mysql dovecot-lmtpd \
|
|
postfix-policyd-spf-perl opendkim opendkim-utils \
|
|
opendmarc \
|
|
php php-fpm php-imap php-mbstring php-mysqli php-curl php-zip php-xml php-bz2 php-intl php-gmp php-ldap php-common php-gd php-sqlite3 \
|
|
php-session php-pdo_mysql php-dom php-ctype php-pecl-imagick php-fileinfo \
|
|
phpunit php-phar php-tokenizer php-xmlwriter \
|
|
# Nginx
|
|
&& sed '/^http {/a\ \
|
|
types_hash_max_size 4096;\n\ \
|
|
server_names_hash_bucket_size 128;\n' -i /etc/nginx/nginx.conf \
|
|
# Installer
|
|
&& /tmp/installer.sh \
|
|
&& rm /tmp/installer.sh \
|
|
&& sed -i '/while ps / s|; do| 2>\&1&|;s|while ps |while ls /proc/|' /usr/local/bin/postwhite/postwhite
|
|
|
|
# Expose ports
|
|
EXPOSE 25
|
|
EXPOSE 80
|
|
EXPOSE 587
|
|
EXPOSE 143 993
|
|
|
|
# Entrypoint hd-wallet-derive script
|
|
CMD ["/docker-entrypoint/entrypoint.sh"]
|