myvemail/build/Dockerfile.ubuntu

54 lines
1.8 KiB
Text
Raw Normal View History

2024-08-09 12:50:33 +00:00
# syntax = docker/dockerfile:1
FROM ubuntu:latest
# LABEL about the custom image
LABEL description="MyveMail"
# Disable Prompt During Packages Installation
ARG DEBIAN_FRONTEND=noninteractive
# Env files (differs between distros)
ENV MYVEMAIL_NGINX_USERGROUP=www-data
ENV MYVEMAIL_OPENDKIM_CONF=/etc/opendkim.conf
ENV MYVEMAIL_OPENDMARC_CONF=/etc/opendmarc.conf
2024-08-14 17:48:59 +00:00
ENV MYVEMAIL_POLICYD=/usr/sbin/postfix-policyd-spf-perl
2024-08-09 12:50:33 +00:00
# Copy required files folders
ADD run/bin /usr/local/bin/
ADD run/docker-entrypoint /docker-entrypoint/
2024-08-10 03:13:59 +00:00
ADD run/installer.sh /tmp/
2024-08-09 12:50:33 +00:00
# Update Ubuntu Software repository and install requisites
2024-08-10 03:13:59 +00:00
RUN apt remove -y nano* exim*; \
2024-08-10 03:17:50 +00:00
apt update \
2024-08-10 03:13:59 +00:00
&& apt upgrade -y \
&& apt dist-upgrade -y \
&& bash -c "echo \"postfix postfix/main_mailer_type string 'Internet Site'\" | debconf-set-selections" \
&& apt install -y \
busybox-syslogd rsync \
2024-08-10 03:13:59 +00:00
ca-certificates \
2024-08-14 17:27:21 +00:00
git wget bind9-host acl dbconfig-no-thanks at \
2024-08-10 03:13:59 +00:00
nginx \
mariadb-server mariadb-client postfix-mysql dovecot-mysql \
php php-fpm php-imap php-mbstring php-mysql php-json php-curl php-zip php-xml php-bz2 php-intl php-gmp php-net-ldap3 php-imagick php-common php-gd php-sqlite3 php-cli \
postfix postfix-pcre \
dovecot-core dovecot-imapd dovecot-lmtpd \
2024-08-14 17:48:59 +00:00
postfix-policyd-spf-perl opendkim opendkim-tools \
2024-08-10 03:13:59 +00:00
opendmarc \
&& apt autoremove -y \
&& apt clean \
&& rm -r -f /var/lib/apt/lists \
# Create vmail user
&& adduser vmail --system --group --uid 600 --disabled-login --home /var/vmail/ --quiet \
# Installer
&& /tmp/installer.sh \
2024-08-09 12:50:33 +00:00
&& rm /tmp/installer.sh
# Expose ports
EXPOSE 25
EXPOSE 80
EXPOSE 587
EXPOSE 143 993
# Entrypoint hd-wallet-derive script
CMD ["/docker-entrypoint/entrypoint.sh"]