mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2026-10-16 12:33:58 +00:00
Unified installer.sh
This commit is contained in:
parent
a8bcc85fa5
commit
b88b91ba6f
4 changed files with 44 additions and 515 deletions
|
|
@ -12,15 +12,33 @@ ENV MYVEMAIL_OPENDMARC_CONF=/etc/opendmarc/opendmarc.conf
|
|||
# Copy required files folders
|
||||
ADD run/bin /usr/local/bin/
|
||||
ADD run/docker-entrypoint /docker-entrypoint/
|
||||
COPY run/installer-alpine.sh /tmp/installer.sh
|
||||
ADD run/installer.sh /tmp/
|
||||
|
||||
# Update Ubuntu Software repository and install requisites
|
||||
RUN printf '%s\n' 'https://dl-cdn.alpinelinux.org/alpine/edge/main/' \
|
||||
'https://dl-cdn.alpinelinux.org/alpine/edge/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 \
|
||||
nginx \
|
||||
mariadb mariadb-client \
|
||||
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 \
|
||||
# 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
|
||||
|
||||
|
|
|
|||
|
|
@ -15,10 +15,32 @@ ENV MYVEMAIL_OPENDMARC_CONF=/etc/opendmarc.conf
|
|||
# Copy required files folders
|
||||
ADD run/bin /usr/local/bin/
|
||||
ADD run/docker-entrypoint /docker-entrypoint/
|
||||
COPY run/installer-ubuntu.sh /tmp/installer.sh
|
||||
ADD run/installer.sh /tmp/
|
||||
|
||||
# Update Ubuntu Software repository and install requisites
|
||||
RUN /tmp/installer.sh \
|
||||
RUN apt remove -y nano* exim*; \
|
||||
&& apt update \
|
||||
&& apt upgrade -y \
|
||||
&& apt dist-upgrade -y \
|
||||
&& bash -c "echo \"postfix postfix/main_mailer_type string 'Internet Site'\" | debconf-set-selections" \
|
||||
&& apt install -y \
|
||||
ca-certificates \
|
||||
git wget bind9-host acl dbconfig-no-thanks \
|
||||
rsyslog \
|
||||
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 \
|
||||
postfix-policyd-spf-python opendkim opendkim-tools \
|
||||
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 \
|
||||
&& rm /tmp/installer.sh
|
||||
|
||||
# Expose ports
|
||||
|
|
|
|||
|
|
@ -2,32 +2,30 @@
|
|||
|
||||
###############
|
||||
#//
|
||||
#// Ubuntu specific
|
||||
#// Alpine specific
|
||||
#//
|
||||
###############
|
||||
# Update and install
|
||||
apt remove -y nano* exim*
|
||||
apt update
|
||||
apt upgrade -y
|
||||
apt dist-upgrade -y
|
||||
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
|
||||
apt install -y \
|
||||
ca-certificates \
|
||||
git wget bind9-host acl dbconfig-no-thanks \
|
||||
rsyslog \
|
||||
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 \
|
||||
postfix-policyd-spf-python opendkim opendkim-tools \
|
||||
opendmarc
|
||||
apt autoremove -y
|
||||
apt clean
|
||||
rm -r -f /var/lib/apt/lists
|
||||
# Pre-create vmail user
|
||||
addgroup -g 600 vmail
|
||||
adduser -S -D -h /var/vmail -u 600 -G vmail vmail
|
||||
|
||||
# Create vmail user
|
||||
adduser vmail --system --group --uid 600 --disabled-login --home /var/vmail/ --quiet
|
||||
# Update and install
|
||||
apk add --no-cache \
|
||||
nginx \
|
||||
mariadb mariadb-client \
|
||||
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
|
||||
|
||||
# Nginx
|
||||
sed '/^http {/a\ \
|
||||
types_hash_max_size 4096;\ \
|
||||
server_names_hash_bucket_size 128;\n' -i /etc/nginx/nginx.conf
|
||||
|
||||
###############
|
||||
#//
|
||||
|
|
@ -46,7 +44,7 @@ mkdir /etc/postfix/sql
|
|||
install -m 1777 -d /run/mysqld
|
||||
|
||||
# DKIM/DMARC
|
||||
mkdir /{run,etc}/{opendkim,opendmarc}
|
||||
mkdir /{run,etc}/{opendkim,opendmarc} >/dev/null 2>&1
|
||||
install -o opendkim -g postfix -d /var/spool/postfix/opendkim/
|
||||
install -m 750 -o opendmarc -g postfix -d /var/spool/postfix/opendmarc/
|
||||
|
||||
Loading…
Reference in a new issue