Copying in pre-existing image recipes.
Showing
25 changed files
with
282 additions
and
0 deletions
dovecot/Dockerfile
0 → 100644
dovecot/files/configure
0 → 100755
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | |||
5 | mkdir -p /etc/dovecot/conf.d/ | ||
6 | cp /tmp/files/dovecot.conf /etc/dovecot/conf.d/99-docker.conf | ||
7 | |||
8 | apt-get update | ||
9 | apt-get install -y ssmtp dovecot-sqlite dovecot-imapd | ||
10 | |||
11 | cp /tmp/files/entrypoint /sbin/entrypoint | ||
12 | |||
13 | addgroup hostgroup | ||
14 | adduser --gecos 'Host User' --ingroup hostgroup --disabled-password hostuser |
dovecot/files/dovecot.conf
0 → 100644
dovecot/files/entrypoint
0 → 100755
1 | #!/bin/bash | ||
2 | |||
3 | set -ex | ||
4 | |||
5 | hostuser_home="$(getent passwd hostuser | cut -f 6 -d :)" | ||
6 | |||
7 | if [[ $GID ]]; then | ||
8 | old_gid=$(getent group hostgroup | cut -f 3 -d :) | ||
9 | groupmod -g $GID hostgroup | ||
10 | find "$hostuser_home" -gid $old_gid -print0 | xargs -0r chgrp hostgroup | ||
11 | fi | ||
12 | if [[ $UID ]]; then | ||
13 | usermod -u $UID hostuser | ||
14 | fi | ||
15 | |||
16 | if [[ $DOVECOT_HOSTUSER_PASSWORD ]]; then | ||
17 | echo "hostuser:$DOVECOT_HOSTUSER_PASSWORD" | chpasswd | ||
18 | fi | ||
19 | |||
20 | exec "$@" |
nginx/Dockerfile
0 → 100644
nginx/files/configure
0 → 100755
nginx/files/entrypoint.sh
0 → 100755
node/Dockerfile
0 → 100644
1 | FROM node | ||
2 | |||
3 | COPY files/ /tmp/files/ | ||
4 | RUN /tmp/files/configure | ||
5 | |||
6 | #ADD https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar /usr/local/bin/wp | ||
7 | #RUN ["chmod", "755", "/usr/local/bin/wp"] | ||
8 | |||
9 | ENTRYPOINT ["/root/entrypoint"] | ||
10 | #CMD ["/usr/sbin/php5-fpm", "--nodaemonize", "--force-stderr", "--fpm-config", "/etc/php5/fpm/php-fpm.conf"] |
node/files/app-defaults.conf
0 → 100644
This diff is collapsed.
Click to expand it.
node/files/configure
0 → 100755
node/files/entrypoint
0 → 100755
1 | #!/bin/bash | ||
2 | |||
3 | set -ex | ||
4 | |||
5 | node_home="$(getent passwd node | cut -f 6 -d :)" | ||
6 | |||
7 | if [[ $GID ]]; then | ||
8 | old_gid=$(getent group node | cut -f 3 -d :) | ||
9 | groupmod -g $GID node | ||
10 | find "$node_home" -gid $old_gid -print0 | xargs -0r chgrp node | ||
11 | fi | ||
12 | if [[ $UID ]]; then | ||
13 | usermod -u $UID node | ||
14 | fi | ||
15 | if [[ -e package.json ]]; then | ||
16 | sudo -u node npm install | ||
17 | fi | ||
18 | exec "$@" |
php-fpm/Dockerfile
0 → 100644
1 | FROM debian:stretch | ||
2 | |||
3 | COPY files/ /tmp/files/ | ||
4 | RUN /tmp/files/configure | ||
5 | |||
6 | ADD https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar /usr/local/bin/wp | ||
7 | RUN ["chmod", "755", "/usr/local/bin/wp"] | ||
8 | |||
9 | ENTRYPOINT ["/root/entrypoint"] | ||
10 | CMD ["/usr/sbin/php-fpm7.0", "--nodaemonize", "--force-stderr", "--fpm-config", "/etc/php/7.0/fpm/php-fpm.conf"] |
php-fpm/files/app-defaults.conf
0 → 100644
This diff is collapsed.
Click to expand it.
php-fpm/files/configure
0 → 100755
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | cp /tmp/files/default-release.conf /etc/apt/apt.conf.d/default-release | ||
5 | apt-get update | ||
6 | apt-get install -y ssmtp php7.0-fpm php7.0-mysql php7.0-imagick php7.0-ldap php7.0-xml php7.0-mbstring php7.0-mcrypt php7.0-gd php7.0-apc git ffmpeg ghostscript | ||
7 | |||
8 | rm /etc/php/7.0/fpm/pool.d/www.conf | ||
9 | cp -a /tmp/files/app-defaults.conf /etc/php/7.0/fpm | ||
10 | |||
11 | cp /tmp/files/entrypoint /root/entrypoint | ||
12 | |||
13 | addgroup hostgroup | ||
14 | adduser --gecos 'Host User' --ingroup hostgroup --disabled-password hostuser | ||
15 | su - hostuser -c 'git config --global user.email hostuser@php-fpm' | ||
16 | su - hostuser -c 'git config --global user.name "Host User"' |
php-fpm/files/default-release.conf
0 → 100644
1 | APT::Default-Release "stretch"; |
php-fpm/files/entrypoint
0 → 100755
1 | #!/bin/bash | ||
2 | |||
3 | set -ex | ||
4 | |||
5 | hostuser_home="$(getent passwd hostuser | cut -f 6 -d :)" | ||
6 | |||
7 | if [[ $GID ]]; then | ||
8 | old_gid=$(getent group hostgroup | cut -f 3 -d :) | ||
9 | groupmod -g $GID hostgroup | ||
10 | find "$hostuser_home" -gid $old_gid -print0 | xargs -0r chgrp hostgroup | ||
11 | fi | ||
12 | if [[ $UID ]]; then | ||
13 | usermod -u $UID hostuser | ||
14 | fi | ||
15 | mkdir -p /run/php | ||
16 | |||
17 | update_sapi_conf() { | ||
18 | declare sapi="$1" file | ||
19 | shift | ||
20 | find "/etc/php/7.0/$sapi/conf.d" -name '97-app-*' -delete | ||
21 | for file in /etc/php/7.0/app.conf.d/*; do | ||
22 | if [[ -r $file ]]; then | ||
23 | ln -sf "$file" "/etc/php/7.0/$sapi/conf.d/97-app-${file##*/}" | ||
24 | fi | ||
25 | done | ||
26 | } | ||
27 | update_sapi_conf fpm | ||
28 | |||
29 | exec "$@" |
php-fpm/files/stretch.list
0 → 100644
1 | deb http://ftp.us.debian.org/debian/ stretch main contrib non-free |
postfix/Dockerfile
0 → 100644
postfix/files/configure
0 → 100755
postfix/files/entrypoint
0 → 100755
1 | #!/bin/bash | ||
2 | |||
3 | set -ex | ||
4 | |||
5 | hostuser_home="$(getent passwd hostuser | cut -f 6 -d :)" | ||
6 | |||
7 | if [[ $GID ]]; then | ||
8 | old_gid=$(getent group hostgroup | cut -f 3 -d :) | ||
9 | groupmod -g $GID hostgroup | ||
10 | find "$hostuser_home" -gid $old_gid -print0 | xargs -0r chgrp hostgroup | ||
11 | fi | ||
12 | if [[ $UID ]]; then | ||
13 | usermod -u $UID hostuser | ||
14 | fi | ||
15 | |||
16 | HOSTNAME=$(hostname -f) | ||
17 | |||
18 | postconf -e \ | ||
19 | "myhostname = ${POSTFIX_MAILNAME:-$HOSTNAME}" \ | ||
20 | "myorigin = app" \ | ||
21 | "mydestination = $HOSTNAME, localhost.localdomain, localhost, app" \ | ||
22 | "mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.0.0.0/8 172.0.0.0/8 192.168.0.0/16"\ | ||
23 | "inet_protocols = all" \ | ||
24 | "relayhost = $POSTFIX_RELAYHOST" \ | ||
25 | "virtual_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/virtual-regexp" \ | ||
26 | "home_mailbox = Maildir/" \ | ||
27 | && true | ||
28 | |||
29 | : > /etc/postfix/virtual | ||
30 | postmap /etc/postfix/virtual | ||
31 | |||
32 | : ${POSTFIX_FORWARD_APP:=hostuser+app@localhost} | ||
33 | : ${POSTFIX_FORWARD_CATCHALL:=hostuser+catchall@localhost} | ||
34 | |||
35 | POSTFIX_FORWARD_APP_quoted="$(echo "$POSTFIX_FORWARD_APP" | sed 's/\([][\\+*.$^()]\)/\\\1/g')" | ||
36 | POSTFIX_FORWARD_CATCHALL_quoted="$(echo "$POSTFIX_FORWARD_CATCHALL" | sed 's/\([][\\+*.$^()]\)/\\\1/g')" | ||
37 | ( | ||
38 | echo "/.+@app/ $POSTFIX_FORWARD_APP" | ||
39 | if [[ $POSTFIX_CATCHALL ]]; then | ||
40 | echo "if !/^($POSTFIX_FORWARD_APP_quoted|$POSTFIX_FORWARD_CATCHALL_quoted)/" | ||
41 | echo "/.+@.+/ $POSTFIX_FORWARD_CATCHALL" | ||
42 | echo "endif" | ||
43 | fi | ||
44 | ) > /etc/postfix/virtual-regexp | ||
45 | |||
46 | cp /etc/resolv.conf /etc/services /var/spool/postfix/etc | ||
47 | |||
48 | /etc/init.d/rsyslog start | ||
49 | exec "$@" |
postfix/files/rsyslog-stderr.conf
0 → 100644
1 | *.* /proc/1/fd/2 |
roundcube/Dockerfile
0 → 100644
roundcube/files/apache-mail-container.conf
0 → 100644
1 | Alias / /var/lib/roundcube/ |
roundcube/files/configure
0 → 100755
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | |||
5 | export DEBIAN_FRONTEND=noninteractive | ||
6 | |||
7 | apt-get update | ||
8 | apt-get install -y ssmtp roundcube-sqlite3 roundcube roundcube-plugins | ||
9 | |||
10 | sed -i "/default_host/c\$config['default_host'] = 'imap';" /etc/roundcube/config.inc.php | ||
11 | sed -i "/smtp_server/c\$config['smtp_server'] = 'smtp';" /etc/roundcube/config.inc.php | ||
12 | |||
13 | for plugin in jqueryui zipdownload; do | ||
14 | cp -a /var/lib/roundcube/plugins/$plugin/config.inc.php.dist /etc/roundcube/plugins/$plugin | ||
15 | done | ||
16 | |||
17 | cp /tmp/files/apache-mail-container.conf /etc/apache2/conf-enabled | ||
18 | |||
19 | cp /tmp/files/entrypoint /sbin/entrypoint | ||
20 | |||
21 | addgroup hostgroup | ||
22 | adduser --gecos 'Host User' --ingroup hostgroup --disabled-password hostuser |
roundcube/files/entrypoint
0 → 100755
1 | #!/bin/bash | ||
2 | |||
3 | set -ex | ||
4 | |||
5 | hostuser_home="$(getent passwd hostuser | cut -f 6 -d :)" | ||
6 | |||
7 | if [[ $GID ]]; then | ||
8 | old_gid=$(getent group hostgroup | cut -f 3 -d :) | ||
9 | groupmod -g $GID hostgroup | ||
10 | find "$hostuser_home" -gid $old_gid -print0 | xargs -0r chgrp hostgroup | ||
11 | fi | ||
12 | if [[ $UID ]]; then | ||
13 | usermod -u $UID hostuser | ||
14 | fi | ||
15 | |||
16 | . /etc/apache2/envvars | ||
17 | |||
18 | exec "$@" |
-
Please register or sign in to post a comment