├── .travis.yml ├── Dockerfile ├── Dockerfile-ansible ├── Dockerfile-latest ├── Dockerfile-local ├── Dockerfile-local-privileged ├── Dockerfile-local-xdebug ├── Dockerfile-packaging_base ├── Dockerfile-php7 ├── Dockerfile-php71 ├── Dockerfile-php72 ├── Dockerfile-phpAll ├── Dockerfile-privileged ├── Dockerfile-test ├── Dockerfile-web ├── Dockerfile-web-ubuntu16 ├── Dockerfile-xdebug ├── Dockerfile-xdebug-php7 ├── Dockerfile-xdebug-php71 ├── Dockerfile-xdebug-php72 ├── LICENSE ├── README.md ├── docker-compose-tests.yml ├── docker-compose.yml ├── docker-entrypoint-queue.sh ├── docker-entrypoint.sh ├── httpd-foreground ├── releases ├── Dockerfile-3.10 ├── Dockerfile-3.11 ├── Dockerfile-3.120 ├── Dockerfile-3.130 ├── Dockerfile-3.14 ├── Dockerfile-3.15 ├── Dockerfile-3.6 ├── Dockerfile-3.7 ├── Dockerfile-3.8 └── Dockerfile-3.9 ├── run-tests.sh └── sudoers-aegir /.travis.yml: -------------------------------------------------------------------------------- 1 | language: generic 2 | 3 | sudo: required 4 | 5 | # Only run test when committing to a master branch. 6 | branches: 7 | only: 8 | - master 9 | 10 | env: 11 | globaL: 12 | - COMPOSE_HTTP_TIMEOUT=3600 13 | - AEGIR_TESTS_VERSION=master 14 | 15 | #env: 16 | # - test: Ubuntu 14.04 Apache 17 | # distribution: ubuntu 18 | # version: 14.04 19 | # init: /sbin/init 20 | # run_opts: "" 21 | 22 | addons: 23 | hosts: 24 | - aegir.local.computer 25 | - sitetest.aegir.local.computer 26 | 27 | services: 28 | - docker 29 | 30 | before_install: 31 | 32 | # Debugging users 33 | - whoami 34 | - id -u 35 | - docker --version 36 | - docker-compose --version 37 | 38 | # upgrade docker-engine to specific version 39 | - git clone http://github.com/aegir-project/tests.git 40 | - cd tests 41 | - git checkout $AEGIR_TESTS_VERSION 42 | # - sudo bash travis/prepare-docker.sh 43 | 44 | - sudo mkdir vendor 45 | - sudo chmod 777 vendor 46 | 47 | - sudo mkdir bin 48 | - sudo chmod 777 bin 49 | 50 | - cd .. 51 | 52 | # First build stock image, and one for own user. 53 | - docker build --rm -t aegir/hostmaster:dev . 54 | - docker build --rm -t aegir/hostmaster:local -f Dockerfile-local --build-arg NEW_UID=$UID . 55 | 56 | script: 57 | 58 | # Launch docker-compose.yml file within tests repo. 59 | - docker-compose --file docker-compose-tests.yml run -T -e TERM=xterm hostmaster 60 | 61 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | # You may change this environment at run time. User UID 1 is created with this email address. 4 | ENV AEGIR_CLIENT_EMAIL aegir@aegir.local.computer 5 | ENV AEGIR_CLIENT_NAME admin 6 | ENV AEGIR_PROFILE hostmaster 7 | ENV AEGIR_VERSION 7.x-3.x 8 | ENV PROVISION_VERSION 7.x-3.x 9 | ENV AEGIR_WORKING_COPY 0 10 | ENV AEGIR_HTTP_SERVICE_TYPE apache 11 | 12 | # Must be fixed across versions so we can upgrade containers. 13 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/hostmaster 14 | 15 | # The Hostname of the database server to use 16 | ENV AEGIR_DATABASE_SERVER database 17 | 18 | # For dev images (7.x-3.x branch) 19 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir.make 20 | 21 | RUN apt-get update -qq && apt-get install -y -qq\ 22 | apache2 \ 23 | curl \ 24 | openssl \ 25 | php5 \ 26 | php5-cli \ 27 | php5-gd \ 28 | php5-mysql \ 29 | php-pear \ 30 | php5-curl \ 31 | postfix \ 32 | sudo \ 33 | rsync \ 34 | git-core \ 35 | unzip \ 36 | wget \ 37 | mysql-client 38 | 39 | ENV AEGIR_UID 1000 40 | 41 | RUN echo "Creating user aegir with UID $AEGIR_UID and GID $AEGIR_GID" 42 | 43 | RUN addgroup --gid $AEGIR_UID aegir 44 | RUN adduser --uid $AEGIR_UID --gid $AEGIR_UID --system --home /var/aegir aegir 45 | RUN adduser aegir www-data 46 | RUN a2enmod rewrite 47 | RUN a2enmod ssl 48 | RUN ln -s /var/aegir/config/apache.conf /etc/apache2/conf-available/aegir.conf 49 | RUN ln -s /etc/apache2/conf-available/aegir.conf /etc/apache2/conf-enabled/aegir.conf 50 | 51 | COPY sudoers-aegir /etc/sudoers.d/aegir 52 | RUN chmod 0440 /etc/sudoers.d/aegir 53 | 54 | RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/1b137f8bf6db3e79a38a5bc45324414a6b1f9df2/web/installer -O - -q | php -- --quiet 55 | RUN cp composer.phar /usr/local/bin/composer 56 | 57 | ENV DRUSH_VERSION=8.3.0 58 | RUN wget https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar -O - -q > /usr/local/bin/drush 59 | RUN chmod +x /usr/local/bin/composer 60 | RUN chmod +x /usr/local/bin/drush 61 | 62 | # Install fix-permissions and fix-ownership scripts 63 | RUN wget http://cgit.drupalcode.org/hosting_tasks_extra/plain/fix_permissions/scripts/standalone-install-fix-permissions-ownership.sh?id=$AEGIR_VERSION 64 | RUN bash standalone-install-fix-permissions-ownership.sh 65 | 66 | COPY docker-entrypoint.sh /usr/local/bin/ 67 | RUN chmod +x /usr/local/bin/docker-entrypoint.sh 68 | 69 | COPY run-tests.sh /usr/local/bin/ 70 | RUN chmod +x /usr/local/bin/run-tests.sh 71 | 72 | #COPY docker-entrypoint-tests.sh /usr/local/bin/ 73 | #RUN chmod +x /usr/local/bin/docker-entrypoint-tests.sh 74 | 75 | COPY docker-entrypoint-queue.sh /usr/local/bin/ 76 | RUN chmod +x /usr/local/bin/docker-entrypoint-queue.sh 77 | 78 | # Prepare Aegir Logs folder. 79 | RUN mkdir /var/log/aegir 80 | RUN chown aegir:aegir /var/log/aegir 81 | RUN echo 'Hello, Aegir.' > /var/log/aegir/system.log 82 | 83 | # Don't install provision. Downstream tags will do this with the right version. 84 | ## Install Provision for all. 85 | #ENV PROVISION_VERSION 7.x-3.x 86 | #RUN mkdir -p /usr/share/drush/commands 87 | #RUN drush dl --destination=/usr/share/drush/commands provision-$PROVISION_VERSION -y 88 | ENV REGISTRY_REBUILD_VERSION 7.x-2.5 89 | RUN drush dl --destination=/usr/share/drush/commands registry_rebuild-$REGISTRY_REBUILD_VERSION -y 90 | 91 | USER aegir 92 | 93 | RUN mkdir /var/aegir/config 94 | RUN mkdir /var/aegir/.drush 95 | 96 | WORKDIR /var/aegir 97 | 98 | # For Releases: 99 | # ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 100 | 101 | VOLUME /var/aegir 102 | 103 | # docker-entrypoint.sh waits for mysql and runs hostmaster install 104 | ENTRYPOINT ["docker-entrypoint.sh"] 105 | CMD ["drush", "@hostmaster", "hosting-queued"] 106 | -------------------------------------------------------------------------------- /Dockerfile-ansible: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster 2 | 3 | USER root 4 | 5 | # Thanks to @geerlingguy 6 | # Install dependencies. 7 | RUN apt-get update \ 8 | && apt-get install -y --no-install-recommends \ 9 | software-properties-common \ 10 | && rm -Rf /var/lib/apt/lists/* \ 11 | && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \ 12 | && apt-get clean 13 | 14 | # Install Ansible. 15 | RUN apt-add-repository -y ppa:ansible/ansible \ 16 | && apt-get update \ 17 | && apt-get install -y --no-install-recommends \ 18 | ansible \ 19 | && rm -rf /var/lib/apt/lists/* \ 20 | && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \ 21 | && apt-get clean 22 | 23 | USER aegir 24 | -------------------------------------------------------------------------------- /Dockerfile-latest: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | RUN apt-get update -qq && apt-get install -y -qq\ 4 | apache2 \ 5 | openssl \ 6 | php5 \ 7 | php5-cli \ 8 | php5-gd \ 9 | php5-mysql \ 10 | php-pear \ 11 | php5-curl \ 12 | postfix \ 13 | sudo \ 14 | rsync \ 15 | git-core \ 16 | unzip \ 17 | wget \ 18 | mysql-client 19 | 20 | ENV AEGIR_UID 1000 21 | 22 | RUN echo "Creating user aegir with UID $AEGIR_UID and GID $AEGIR_GID" 23 | 24 | RUN addgroup --gid $AEGIR_UID aegir 25 | RUN adduser --uid $AEGIR_UID --gid $AEGIR_UID --system --home /var/aegir aegir 26 | RUN adduser aegir www-data 27 | RUN a2enmod rewrite 28 | RUN a2enmod ssl 29 | RUN ln -s /var/aegir/config/apache.conf /etc/apache2/conf-available/aegir.conf 30 | RUN ln -s /etc/apache2/conf-available/aegir.conf /etc/apache2/conf-enabled/aegir.conf 31 | 32 | COPY sudoers-aegir /etc/sudoers.d/aegir 33 | RUN chmod 0440 /etc/sudoers.d/aegir 34 | 35 | RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/1b137f8bf6db3e79a38a5bc45324414a6b1f9df2/web/installer -O - -q | php -- --quiet 36 | RUN cp composer.phar /usr/local/bin/composer 37 | 38 | ENV DRUSH_VERSION=8.3.0 39 | RUN wget https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar -O - -q > /usr/local/bin/drush 40 | RUN chmod +x /usr/local/bin/composer 41 | RUN chmod +x /usr/local/bin/drush 42 | 43 | # Install fix-permissions and fix-ownership scripts 44 | RUN wget http://cgit.drupalcode.org/hosting_tasks_extra/plain/fix_permissions/scripts/standalone-install-fix-permissions-ownership.sh 45 | RUN bash standalone-install-fix-permissions-ownership.sh 46 | 47 | COPY docker-entrypoint.sh /usr/local/bin/ 48 | RUN chmod +x /usr/local/bin/docker-entrypoint.sh 49 | 50 | COPY run-tests.sh /usr/local/bin/ 51 | RUN chmod +x /usr/local/bin/run-tests.sh 52 | 53 | #COPY docker-entrypoint-tests.sh /usr/local/bin/ 54 | #RUN chmod +x /usr/local/bin/docker-entrypoint-tests.sh 55 | 56 | COPY docker-entrypoint-queue.sh /usr/local/bin/ 57 | RUN chmod +x /usr/local/bin/docker-entrypoint-queue.sh 58 | 59 | # Prepare Aegir Logs folder. 60 | RUN mkdir /var/log/aegir 61 | RUN chown aegir:aegir /var/log/aegir 62 | RUN echo 'Hello, Aegir.' > /var/log/aegir/system.log 63 | 64 | # Don't install provision. Downstream tags will do this with the right version. 65 | ## Install Provision for all. 66 | #ENV PROVISION_VERSION 7.x-3.x 67 | #RUN mkdir -p /usr/share/drush/commands 68 | #RUN drush dl --destination=/usr/share/drush/commands provision-$PROVISION_VERSION -y 69 | ENV REGISTRY_REBUILD_VERSION 7.x-2.5 70 | RUN drush dl --destination=/usr/share/drush/commands registry_rebuild-$REGISTRY_REBUILD_VERSION -y 71 | 72 | USER aegir 73 | 74 | RUN mkdir /var/aegir/config 75 | RUN mkdir /var/aegir/.drush 76 | 77 | # You may change this environment at run time. User UID 1 is created with this email address. 78 | ENV AEGIR_CLIENT_EMAIL aegir@aegir.local.computer 79 | ENV AEGIR_CLIENT_NAME admin 80 | ENV AEGIR_PROFILE hostmaster 81 | ENV AEGIR_VERSION 7.x-3.x 82 | ENV PROVISION_VERSION 7.x-3.x 83 | ENV AEGIR_WORKING_COPY 0 84 | ENV AEGIR_HTTP_SERVICE_TYPE apache 85 | 86 | # Must be fixed across versions so we can upgrade containers. 87 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/hostmaster 88 | 89 | WORKDIR /var/aegir 90 | 91 | # The Hostname of the database server to use 92 | ENV AEGIR_DATABASE_SERVER database 93 | 94 | # For dev images (7.x-3.x branch) 95 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-latest.make 96 | 97 | # For Releases: 98 | # ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 99 | 100 | VOLUME /var/aegir 101 | 102 | # docker-entrypoint.sh waits for mysql and runs hostmaster install 103 | ENTRYPOINT ["docker-entrypoint.sh"] 104 | CMD ["drush", "@hostmaster", "hosting-queued"] 105 | -------------------------------------------------------------------------------- /Dockerfile-local: -------------------------------------------------------------------------------- 1 | # This Dockerfile is used to change the Aegir user UID to match the host system's user. 2 | # This allows seamless file sharing via docker volumes. 3 | 4 | # Use --build-arg option when running docker build to set the desired UID of the "aegir" user. 5 | 6 | # Local almost always wants xdebug. 7 | FROM aegir/hostmaster:dev 8 | 9 | USER root 10 | 11 | ARG NEW_UID=1000 12 | 13 | RUN echo "Attempting to update aegir UID to $NEW_UID ..." 14 | RUN usermod -u $NEW_UID aegir 15 | 16 | RUN echo "Attempting to update aegir GID to $NEW_UID ..." 17 | RUN groupmod -g $NEW_UID aegir 18 | 19 | RUN echo "Attempting to change ownership of /var/aegir to $NEW_UID ..." 20 | RUN chown $NEW_UID /var/aegir -R 21 | RUN chgrp $NEW_UID /var/aegir -R 22 | 23 | USER aegir -------------------------------------------------------------------------------- /Dockerfile-local-privileged: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster:local 2 | USER root 3 | ENV DOCKER_VERSION 1.9.1 4 | ENV DOCKER_COMPOSE_VERSION 1.9.0 5 | 6 | 7 | # Install the docker client. 8 | RUN wget -q https://get.docker.com/builds/Linux/x86_64/docker-$DOCKER_VERSION && \ 9 | cp docker-1.9.1 /usr/bin/docker && \ 10 | chmod +x /usr/bin/docker 11 | 12 | # Install docker-compose. 13 | RUN wget -q "https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" && \ 14 | cp "docker-compose-$(uname -s)-$(uname -m)" /usr/bin/docker-compose && \ 15 | chmod +x /usr/bin/docker-compose 16 | 17 | # Add the docker group and add aegir to it. 18 | ARG DOCKER_GID=1001 19 | RUN addgroup --gid $DOCKER_GID docker 20 | RUN adduser aegir docker 21 | 22 | USER aegir -------------------------------------------------------------------------------- /Dockerfile-local-xdebug: -------------------------------------------------------------------------------- 1 | # This Dockerfile is used to change the Aegir user UID to match the host system's user. 2 | # This allows seamless file sharing via docker volumes. 3 | 4 | # Use --build-arg option when running docker build to set the desired UID of the "aegir" user. 5 | 6 | # Local almost always wants xdebug. 7 | FROM aegir/hostmaster:xdebug 8 | 9 | USER root 10 | 11 | ARG NEW_UID=1000 12 | 13 | RUN echo "Attempting to update aegir UID to $NEW_UID ..." 14 | RUN usermod -u $NEW_UID aegir 15 | 16 | RUN echo "Attempting to update aegir GID to $NEW_UID ..." 17 | RUN groupmod -g $NEW_UID aegir 18 | 19 | RUN echo "Attempting to change ownership of /var/aegir to $NEW_UID ..." 20 | RUN chown $NEW_UID /var/aegir -R 21 | RUN chgrp $NEW_UID /var/aegir -R 22 | 23 | USER aegir -------------------------------------------------------------------------------- /Dockerfile-packaging_base: -------------------------------------------------------------------------------- 1 | FROM debian:jessie 2 | 3 | RUN apt-get update 4 | RUN apt-get install --yes devscripts build-essential debian-keyring 5 | RUN apt-get install --yes git-core git-buildpackage dh-systemd 6 | 7 | 8 | -------------------------------------------------------------------------------- /Dockerfile-php7: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | ENV DEBIAN_FRONTEND=noninteractive 3 | RUN apt-get update -qq && apt-get install -y -qq\ 4 | apache2 \ 5 | cron \ 6 | curl \ 7 | git-core \ 8 | libapache2-mod-php \ 9 | libpcre3-dev \ 10 | nano \ 11 | mysql-client \ 12 | php-apcu \ 13 | php-sqlite3 \ 14 | php7.0-cli \ 15 | php7.0-common \ 16 | php7.0-curl \ 17 | php7.0-dev \ 18 | php7.0-fpm \ 19 | php7.0-gd \ 20 | php7.0-imap \ 21 | php7.0-json \ 22 | php7.0-mbstring \ 23 | php7.0-mysql \ 24 | php7.0-opcache \ 25 | php7.0-xml \ 26 | postfix \ 27 | rsync \ 28 | sudo \ 29 | unzip \ 30 | vim \ 31 | wget 32 | 33 | # Use --build-arg option when running docker build to set these variables. 34 | # If wish to "mount" a volume to your host, set AEGIR_UID and AEGIR_GIT to your local user's UID. 35 | # There are both ARG and ENV lines to make sure the value persists. 36 | # See https://docs.docker.com/engine/reference/builder/#/arg 37 | ARG AEGIR_UID=1000 38 | ENV AEGIR_UID ${AEGIR_UID:-1000} 39 | 40 | RUN echo "Creating user aegir with UID $AEGIR_UID and GID $AEGIR_GID" 41 | 42 | RUN addgroup --gid $AEGIR_UID aegir 43 | RUN adduser --uid $AEGIR_UID --gid $AEGIR_UID --system --shell /bin/bash --home /var/aegir aegir 44 | RUN adduser aegir www-data 45 | RUN a2enmod rewrite 46 | RUN a2enmod ssl 47 | RUN ln -s /var/aegir/config/apache.conf /etc/apache2/conf-available/aegir.conf 48 | RUN ln -s /etc/apache2/conf-available/aegir.conf /etc/apache2/conf-enabled/aegir.conf 49 | 50 | COPY sudoers-aegir /etc/sudoers.d/aegir 51 | RUN chmod 0440 /etc/sudoers.d/aegir 52 | 53 | RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/e831e1e4d6cabfb11fa9657103cf728e6eb9e295/web/installer -O - -q | php -- --quiet 54 | RUN cp composer.phar /usr/local/bin/composer 55 | 56 | 57 | ENV DRUSH_VERSION=8.3.0 58 | RUN wget https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar -O - -q > /usr/local/bin/drush 59 | RUN chmod +x /usr/local/bin/composer 60 | RUN chmod +x /usr/local/bin/drush 61 | 62 | # Install fix-permissions and fix-ownership scripts 63 | RUN wget http://cgit.drupalcode.org/hosting_tasks_extra/plain/fix_permissions/scripts/standalone-install-fix-permissions-ownership.sh 64 | RUN bash standalone-install-fix-permissions-ownership.sh 65 | 66 | COPY docker-entrypoint.sh /usr/local/bin/ 67 | RUN chmod +x /usr/local/bin/docker-entrypoint.sh 68 | 69 | COPY run-tests.sh /usr/local/bin/ 70 | RUN chmod +x /usr/local/bin/run-tests.sh 71 | 72 | #COPY docker-entrypoint-tests.sh /usr/local/bin/ 73 | #RUN chmod +x /usr/local/bin/docker-entrypoint-tests.sh 74 | 75 | COPY docker-entrypoint-queue.sh /usr/local/bin/ 76 | RUN chmod +x /usr/local/bin/docker-entrypoint-queue.sh 77 | 78 | # Prepare Aegir Logs folder. 79 | RUN mkdir /var/log/aegir 80 | RUN chown aegir:aegir /var/log/aegir 81 | RUN echo 'Hello, Aegir.' > /var/log/aegir/system.log 82 | 83 | # Don't install provision. Downstream tags will do this with the right version. 84 | ## Install Provision for all. 85 | #ENV PROVISION_VERSION 7.x-3.x 86 | #RUN mkdir -p /usr/share/drush/commands 87 | #RUN drush dl --destination=/usr/share/drush/commands provision-$PROVISION_VERSION -y 88 | ENV REGISTRY_REBUILD_VERSION 7.x-2.5 89 | RUN drush dl --destination=/usr/share/drush/commands registry_rebuild-$REGISTRY_REBUILD_VERSION -y 90 | 91 | USER aegir 92 | 93 | RUN mkdir /var/aegir/config 94 | RUN mkdir /var/aegir/.drush 95 | 96 | # You may change this environment at run time. User UID 1 is created with this email address. 97 | ENV AEGIR_CLIENT_EMAIL aegir@aegir.local.computer 98 | ENV AEGIR_CLIENT_NAME admin 99 | ENV AEGIR_PROFILE hostmaster 100 | ENV AEGIR_VERSION 7.x-3.x 101 | ENV PROVISION_VERSION 7.x-3.x 102 | ENV AEGIR_WORKING_COPY 0 103 | ENV AEGIR_HTTP_SERVICE_TYPE apache 104 | 105 | # Must be fixed across versions so we can upgrade containers. 106 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/hostmaster 107 | 108 | WORKDIR /var/aegir 109 | 110 | # The Hostname of the database server to use 111 | ENV AEGIR_DATABASE_SERVER database 112 | 113 | # For dev images (7.x-3.x branch) 114 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir.make 115 | 116 | # For Releases: 117 | # ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 118 | 119 | VOLUME /var/aegir 120 | 121 | # docker-entrypoint.sh waits for mysql and runs hostmaster install 122 | ENTRYPOINT ["docker-entrypoint.sh"] 123 | CMD ["drush", "@hostmaster", "hosting-queued"] 124 | -------------------------------------------------------------------------------- /Dockerfile-php71: -------------------------------------------------------------------------------- 1 | FROM ubuntu:17.10 2 | ENV DEBIAN_FRONTEND=noninteractive 3 | RUN apt-get update -qq && apt-get install -y -qq\ 4 | apache2 \ 5 | cron \ 6 | curl \ 7 | git-core \ 8 | libapache2-mod-php \ 9 | libpcre3-dev \ 10 | mysql-client \ 11 | nano \ 12 | php-apcu \ 13 | php-sqlite3 \ 14 | php7.1-cli \ 15 | php7.1-common \ 16 | php7.1-curl \ 17 | php7.1-dev \ 18 | php7.1-fpm \ 19 | php7.1-gd \ 20 | php7.1-imap \ 21 | php7.1-json \ 22 | php7.1-mbstring \ 23 | php7.1-mysql \ 24 | php7.1-opcache \ 25 | php7.1-xml \ 26 | postfix \ 27 | rsync \ 28 | sudo \ 29 | unzip \ 30 | vim \ 31 | wget 32 | 33 | # Use --build-arg option when running docker build to set these variables. 34 | # If wish to "mount" a volume to your host, set AEGIR_UID and AEGIR_GIT to your local user's UID. 35 | # There are both ARG and ENV lines to make sure the value persists. 36 | # See https://docs.docker.com/engine/reference/builder/#/arg 37 | ARG AEGIR_UID=1000 38 | ENV AEGIR_UID ${AEGIR_UID:-1000} 39 | 40 | RUN echo "Creating user aegir with UID $AEGIR_UID and GID $AEGIR_GID" 41 | 42 | RUN addgroup --gid $AEGIR_UID aegir 43 | RUN adduser --uid $AEGIR_UID --gid $AEGIR_UID --system --shell /bin/bash --home /var/aegir aegir 44 | RUN adduser aegir www-data 45 | RUN a2enmod rewrite 46 | RUN a2enmod ssl 47 | RUN ln -s /var/aegir/config/apache.conf /etc/apache2/conf-available/aegir.conf 48 | RUN ln -s /etc/apache2/conf-available/aegir.conf /etc/apache2/conf-enabled/aegir.conf 49 | 50 | COPY sudoers-aegir /etc/sudoers.d/aegir 51 | RUN chmod 0440 /etc/sudoers.d/aegir 52 | 53 | RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/e831e1e4d6cabfb11fa9657103cf728e6eb9e295/web/installer -O - -q | php -- --quiet 54 | RUN cp composer.phar /usr/local/bin/composer 55 | 56 | ENV DRUSH_VERSION=8.3.0 57 | RUN wget https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar -O - -q > /usr/local/bin/drush 58 | RUN chmod +x /usr/local/bin/composer 59 | RUN chmod +x /usr/local/bin/drush 60 | 61 | # Install fix-permissions and fix-ownership scripts 62 | RUN wget http://cgit.drupalcode.org/hosting_tasks_extra/plain/fix_permissions/scripts/standalone-install-fix-permissions-ownership.sh 63 | RUN bash standalone-install-fix-permissions-ownership.sh 64 | 65 | COPY docker-entrypoint.sh /usr/local/bin/ 66 | RUN chmod +x /usr/local/bin/docker-entrypoint.sh 67 | 68 | COPY run-tests.sh /usr/local/bin/ 69 | RUN chmod +x /usr/local/bin/run-tests.sh 70 | 71 | #COPY docker-entrypoint-tests.sh /usr/local/bin/ 72 | #RUN chmod +x /usr/local/bin/docker-entrypoint-tests.sh 73 | 74 | COPY docker-entrypoint-queue.sh /usr/local/bin/ 75 | RUN chmod +x /usr/local/bin/docker-entrypoint-queue.sh 76 | 77 | # Prepare Aegir Logs folder. 78 | RUN mkdir /var/log/aegir 79 | RUN chown aegir:aegir /var/log/aegir 80 | RUN echo 'Hello, Aegir.' > /var/log/aegir/system.log 81 | 82 | # Don't install provision. Downstream tags will do this with the right version. 83 | ## Install Provision for all. 84 | #ENV PROVISION_VERSION 7.x-3.x 85 | #RUN mkdir -p /usr/share/drush/commands 86 | #RUN drush dl --destination=/usr/share/drush/commands provision-$PROVISION_VERSION -y 87 | ENV REGISTRY_REBUILD_VERSION 7.x-2.5 88 | RUN drush dl --destination=/usr/share/drush/commands registry_rebuild-$REGISTRY_REBUILD_VERSION -y 89 | 90 | USER aegir 91 | 92 | RUN mkdir /var/aegir/config 93 | RUN mkdir /var/aegir/.drush 94 | 95 | # You may change this environment at run time. User UID 1 is created with this email address. 96 | ENV AEGIR_CLIENT_EMAIL aegir@aegir.local.computer 97 | ENV AEGIR_CLIENT_NAME admin 98 | ENV AEGIR_PROFILE hostmaster 99 | ENV AEGIR_VERSION 7.x-3.x 100 | ENV PROVISION_VERSION 7.x-3.x 101 | ENV AEGIR_WORKING_COPY 0 102 | ENV AEGIR_HTTP_SERVICE_TYPE apache 103 | 104 | # Must be fixed across versions so we can upgrade containers. 105 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/hostmaster 106 | 107 | WORKDIR /var/aegir 108 | 109 | # The Hostname of the database server to use 110 | ENV AEGIR_DATABASE_SERVER database 111 | 112 | # For dev images (7.x-3.x branch) 113 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir.make 114 | 115 | # For Releases: 116 | # ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 117 | 118 | VOLUME /var/aegir 119 | 120 | # docker-entrypoint.sh waits for mysql and runs hostmaster install 121 | ENTRYPOINT ["docker-entrypoint.sh"] 122 | CMD ["drush", "@hostmaster", "hosting-queued"] 123 | -------------------------------------------------------------------------------- /Dockerfile-php72: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | ENV DEBIAN_FRONTEND=noninteractive 3 | RUN apt-get update -qq && apt-get install -y -qq\ 4 | apache2 \ 5 | cron \ 6 | curl \ 7 | git-core \ 8 | libapache2-mod-php \ 9 | libpcre3-dev \ 10 | mysql-client \ 11 | nano \ 12 | php-apcu \ 13 | php-cli \ 14 | php-common \ 15 | php-curl \ 16 | php-dev \ 17 | php-fpm \ 18 | php-gd \ 19 | php-imap \ 20 | php-json \ 21 | php-mbstring \ 22 | php-mysql \ 23 | php-opcache \ 24 | php-sqlite3 \ 25 | php-xml \ 26 | postfix \ 27 | rsync \ 28 | sudo \ 29 | unzip \ 30 | vim \ 31 | wget 32 | 33 | # Use --build-arg option when running docker build to set these variables. 34 | # If wish to "mount" a volume to your host, set AEGIR_UID and AEGIR_GIT to your local user's UID. 35 | # There are both ARG and ENV lines to make sure the value persists. 36 | # See https://docs.docker.com/engine/reference/builder/#/arg 37 | ARG AEGIR_UID=1000 38 | ENV AEGIR_UID ${AEGIR_UID:-1000} 39 | 40 | RUN echo "Creating user aegir with UID $AEGIR_UID and GID $AEGIR_GID" 41 | 42 | RUN addgroup --gid $AEGIR_UID aegir 43 | RUN adduser --uid $AEGIR_UID --gid $AEGIR_UID --system --shell /bin/bash --home /var/aegir aegir 44 | RUN adduser aegir www-data 45 | RUN a2enmod rewrite 46 | RUN a2enmod ssl 47 | RUN ln -s /var/aegir/config/apache.conf /etc/apache2/conf-available/aegir.conf 48 | RUN ln -s /etc/apache2/conf-available/aegir.conf /etc/apache2/conf-enabled/aegir.conf 49 | 50 | COPY sudoers-aegir /etc/sudoers.d/aegir 51 | RUN chmod 0440 /etc/sudoers.d/aegir 52 | 53 | RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/e831e1e4d6cabfb11fa9657103cf728e6eb9e295/web/installer -O - -q | php -- --quiet 54 | RUN cp composer.phar /usr/local/bin/composer 55 | 56 | 57 | ENV DRUSH_VERSION=8.3.0 58 | RUN wget https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar -O - -q > /usr/local/bin/drush 59 | RUN chmod +x /usr/local/bin/composer 60 | RUN chmod +x /usr/local/bin/drush 61 | 62 | # Install fix-permissions and fix-ownership scripts 63 | RUN wget http://cgit.drupalcode.org/hosting_tasks_extra/plain/fix_permissions/scripts/standalone-install-fix-permissions-ownership.sh 64 | RUN bash standalone-install-fix-permissions-ownership.sh 65 | 66 | COPY docker-entrypoint.sh /usr/local/bin/ 67 | RUN chmod +x /usr/local/bin/docker-entrypoint.sh 68 | 69 | COPY run-tests.sh /usr/local/bin/ 70 | RUN chmod +x /usr/local/bin/run-tests.sh 71 | 72 | #COPY docker-entrypoint-tests.sh /usr/local/bin/ 73 | #RUN chmod +x /usr/local/bin/docker-entrypoint-tests.sh 74 | 75 | COPY docker-entrypoint-queue.sh /usr/local/bin/ 76 | RUN chmod +x /usr/local/bin/docker-entrypoint-queue.sh 77 | 78 | # Prepare Aegir Logs folder. 79 | RUN mkdir /var/log/aegir 80 | RUN chown aegir:aegir /var/log/aegir 81 | RUN echo 'Hello, Aegir.' > /var/log/aegir/system.log 82 | 83 | # Don't install provision. Downstream tags will do this with the right version. 84 | ## Install Provision for all. 85 | #ENV PROVISION_VERSION 7.x-3.x 86 | #RUN mkdir -p /usr/share/drush/commands 87 | #RUN drush dl --destination=/usr/share/drush/commands provision-$PROVISION_VERSION -y 88 | ENV REGISTRY_REBUILD_VERSION 7.x-2.5 89 | RUN drush dl --destination=/usr/share/drush/commands registry_rebuild-$REGISTRY_REBUILD_VERSION -y 90 | 91 | USER aegir 92 | 93 | RUN mkdir /var/aegir/config 94 | RUN mkdir /var/aegir/.drush 95 | 96 | # You may change this environment at run time. User UID 1 is created with this email address. 97 | ENV AEGIR_CLIENT_EMAIL aegir@aegir.local.computer 98 | ENV AEGIR_CLIENT_NAME admin 99 | ENV AEGIR_PROFILE hostmaster 100 | ENV AEGIR_VERSION 7.x-3.x 101 | ENV PROVISION_VERSION 7.x-3.x 102 | ENV AEGIR_WORKING_COPY 0 103 | ENV AEGIR_HTTP_SERVICE_TYPE apache 104 | 105 | # Must be fixed across versions so we can upgrade containers. 106 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/hostmaster 107 | 108 | WORKDIR /var/aegir 109 | 110 | # The Hostname of the database server to use 111 | ENV AEGIR_DATABASE_SERVER database 112 | 113 | # For dev images (7.x-3.x branch) 114 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir.make 115 | 116 | # For Releases: 117 | # ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 118 | 119 | VOLUME /var/aegir 120 | 121 | # docker-entrypoint.sh waits for mysql and runs hostmaster install 122 | ENTRYPOINT ["docker-entrypoint.sh"] 123 | CMD ["drush", "@hostmaster", "hosting-queued"] 124 | -------------------------------------------------------------------------------- /Dockerfile-phpAll: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | ENV DEBIAN_FRONTEND=noninteractive 3 | RUN apt-get update -qq && apt-get install -y -qq\ 4 | apache2 \ 5 | cron \ 6 | curl \ 7 | libpcre3-dev \ 8 | git-core \ 9 | mysql-client \ 10 | postfix \ 11 | rsync \ 12 | sudo \ 13 | unzip \ 14 | vim \ 15 | wget 16 | 17 | ENV LC_ALL=C.UTF-8 18 | ENV LANG=en_US.UTF-8 19 | RUN apt-get update -qq && apt-get install -y -qq\ 20 | software-properties-common 21 | 22 | RUN add-apt-repository ppa:ondrej/php && \ 23 | add-apt-repository ppa:ondrej/apache2 && \ 24 | apt-get update -qq 25 | 26 | # PHP 7.2 27 | RUN apt-get install -y -qq \ 28 | php7.2 \ 29 | php7.2-cli \ 30 | php7.2-curl \ 31 | php7.2-fpm \ 32 | php7.2-gd \ 33 | php7.2-json \ 34 | php7.2-mbstring \ 35 | php7.2-mysql \ 36 | php7.2-sqlite3 \ 37 | php7.2-xml 38 | 39 | # PHP 7.1 40 | RUN apt-get install -y -qq \ 41 | php7.1 \ 42 | php7.1-cli \ 43 | php7.1-curl \ 44 | php7.1-fpm \ 45 | php7.1-gd \ 46 | php7.1-json \ 47 | php7.1-mbstring \ 48 | php7.1-mysql \ 49 | php7.1-sqlite3 \ 50 | php7.1-xml 51 | 52 | # PHP 7.0 53 | RUN apt-get install -y -qq \ 54 | php7.0 \ 55 | php7.0-cli \ 56 | php7.0-curl \ 57 | php7.0-fpm \ 58 | php7.0-gd \ 59 | php7.0-json \ 60 | php7.0-mbstring \ 61 | php7.0-mysql \ 62 | php7.0-sqlite3 \ 63 | php7.0-xml 64 | 65 | # PHP 5.6 66 | RUN apt-get install -y -qq \ 67 | php5.6 \ 68 | php5.6-cli \ 69 | php5.6-curl \ 70 | php5.6-fpm \ 71 | php5.6-gd \ 72 | php5.6-json \ 73 | php5.6-mbstring \ 74 | php5.6-mysql \ 75 | php5.6-sqlite3 \ 76 | php5.6-xml 77 | 78 | RUN a2enmod mpm_event proxy_fcgi setenvif 79 | 80 | # Use --build-arg option when running docker build to set these variables. 81 | # If wish to "mount" a volume to your host, set AEGIR_UID and AEGIR_GIT to your local user's UID. 82 | # There are both ARG and ENV lines to make sure the value persists. 83 | # See https://docs.docker.com/engine/reference/builder/#/arg 84 | ARG AEGIR_UID=1000 85 | ENV AEGIR_UID ${AEGIR_UID:-1000} 86 | 87 | RUN echo "Creating user aegir with UID $AEGIR_UID and GID $AEGIR_GID" 88 | 89 | RUN addgroup --gid $AEGIR_UID aegir 90 | RUN adduser --uid $AEGIR_UID --gid $AEGIR_UID --system --shell /bin/bash --home /var/aegir aegir 91 | RUN adduser aegir www-data 92 | RUN a2enmod rewrite 93 | RUN a2enmod ssl 94 | RUN ln -s /var/aegir/config/apache.conf /etc/apache2/conf-available/aegir.conf 95 | RUN ln -s /etc/apache2/conf-available/aegir.conf /etc/apache2/conf-enabled/aegir.conf 96 | 97 | COPY sudoers-aegir /etc/sudoers.d/aegir 98 | RUN chmod 0440 /etc/sudoers.d/aegir 99 | 100 | RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/35ca72b506eba32c0baed4d283a5f834968e5ade/web/installer -O - -q | php -- --quiet 101 | RUN cp composer.phar /usr/local/bin/composer 102 | 103 | ENV DRUSH_VERSION=8.3.0 104 | RUN wget https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar -O - -q > /usr/local/bin/drush 105 | RUN chmod +x /usr/local/bin/composer 106 | RUN chmod +x /usr/local/bin/drush 107 | 108 | # Install fix-permissions and fix-ownership scripts 109 | RUN wget http://cgit.drupalcode.org/hosting_tasks_extra/plain/fix_permissions/scripts/standalone-install-fix-permissions-ownership.sh 110 | RUN bash standalone-install-fix-permissions-ownership.sh 111 | 112 | COPY docker-entrypoint.sh /usr/local/bin/ 113 | RUN chmod +x /usr/local/bin/docker-entrypoint.sh 114 | 115 | COPY run-tests.sh /usr/local/bin/ 116 | RUN chmod +x /usr/local/bin/run-tests.sh 117 | 118 | #COPY docker-entrypoint-tests.sh /usr/local/bin/ 119 | #RUN chmod +x /usr/local/bin/docker-entrypoint-tests.sh 120 | 121 | COPY docker-entrypoint-queue.sh /usr/local/bin/ 122 | RUN chmod +x /usr/local/bin/docker-entrypoint-queue.sh 123 | 124 | # Prepare Aegir Logs folder. 125 | RUN mkdir /var/log/aegir 126 | RUN chown aegir:aegir /var/log/aegir 127 | RUN echo 'Hello, Aegir.' > /var/log/aegir/system.log 128 | 129 | # Don't install provision. Downstream tags will do this with the right version. 130 | ## Install Provision for all. 131 | #ENV PROVISION_VERSION 7.x-3.x 132 | #RUN mkdir -p /usr/share/drush/commands 133 | #RUN drush dl --destination=/usr/share/drush/commands provision-$PROVISION_VERSION -y 134 | ENV REGISTRY_REBUILD_VERSION 7.x-2.5 135 | RUN drush dl --destination=/usr/share/drush/commands registry_rebuild-$REGISTRY_REBUILD_VERSION -y 136 | 137 | USER aegir 138 | 139 | RUN mkdir /var/aegir/config 140 | RUN mkdir /var/aegir/.drush 141 | 142 | # You may change this environment at run time. User UID 1 is created with this email address. 143 | ENV AEGIR_CLIENT_EMAIL aegir@aegir.local.computer 144 | ENV AEGIR_CLIENT_NAME admin 145 | ENV AEGIR_PROFILE hostmaster 146 | ENV AEGIR_VERSION 7.x-3.x 147 | ENV PROVISION_VERSION 7.x-3.x 148 | ENV AEGIR_WORKING_COPY 0 149 | ENV AEGIR_HTTP_SERVICE_TYPE apache 150 | 151 | # Must be fixed across versions so we can upgrade containers. 152 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/hostmaster 153 | 154 | WORKDIR /var/aegir 155 | 156 | # The Hostname of the database server to use 157 | ENV AEGIR_DATABASE_SERVER database 158 | 159 | # For dev images (7.x-3.x branch) 160 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir.make 161 | 162 | # For Releases: 163 | # ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 164 | 165 | VOLUME /var/aegir 166 | 167 | # docker-entrypoint.sh waits for mysql and runs hostmaster install 168 | ENTRYPOINT ["docker-entrypoint.sh"] 169 | CMD ["drush", "@hostmaster", "hosting-queued"] 170 | -------------------------------------------------------------------------------- /Dockerfile-privileged: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster:php7 2 | 3 | USER root 4 | ENV DOCKER_COMPOSE_VERSION 1.19.0 5 | 6 | # Add the docker group and add aegir to it. 7 | ARG DOCKER_GID=1001 8 | RUN addgroup --gid $DOCKER_GID docker 9 | RUN adduser aegir docker 10 | 11 | # Install the docker client. 12 | RUN wget -q https://get.docker.com -O /root/get-docker.sh 13 | RUN sh /root/get-docker.sh 14 | 15 | # Install docker-compose. 16 | RUN wget -q "https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" && \ 17 | cp "docker-compose-$(uname -s)-$(uname -m)" /usr/bin/docker-compose && \ 18 | chmod +x /usr/bin/docker-compose 19 | 20 | USER aegir 21 | -------------------------------------------------------------------------------- /Dockerfile-test: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster:local 2 | 3 | CMD ["run-tests.sh"] -------------------------------------------------------------------------------- /Dockerfile-web: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | RUN apt-get update -qq && apt-get install -y -qq\ 4 | apache2 \ 5 | php5 \ 6 | php5-cli \ 7 | php5-gd \ 8 | php5-mysqlnd \ 9 | php-pear \ 10 | php5-curl \ 11 | postfix \ 12 | sudo \ 13 | rsync \ 14 | git-core \ 15 | unzip \ 16 | wget \ 17 | mysql-client 18 | 19 | # Use --build-arg option when running docker build to set these variables. 20 | # If wish to "mount" a volume to your host, set AEGIR_UID and AEGIR_GIT to your local user's UID. 21 | # There are both ARG and ENV lines to make sure the value persists. 22 | # See https://docs.docker.com/engine/reference/builder/#/arg 23 | ARG AEGIR_UID=1000 24 | ENV AEGIR_UID ${AEGIR_UID:-1000} 25 | 26 | RUN echo "Creating user aegir with UID $AEGIR_UID and GID $AEGIR_GID" 27 | 28 | RUN addgroup --gid $AEGIR_UID aegir 29 | RUN adduser --uid $AEGIR_UID --gid $AEGIR_UID --system --shell /bin/bash --home /var/aegir aegir 30 | RUN adduser aegir www-data 31 | RUN a2enmod rewrite 32 | 33 | # Save a symlink to the /var/aegir/config/docker.conf file. 34 | RUN mkdir -p /var/aegir/config 35 | RUN chown aegir:aegir /var/aegir/config -R 36 | RUN ln -sf /var/aegir/config/docker.conf /etc/apache2/conf-available/aegir.conf 37 | RUN ln -sf /etc/apache2/conf-available/aegir.conf /etc/apache2/conf-enabled/aegir.conf 38 | 39 | COPY sudoers-aegir /etc/sudoers.d/aegir 40 | RUN chmod 0440 /etc/sudoers.d/aegir 41 | 42 | RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/1b137f8bf6db3e79a38a5bc45324414a6b1f9df2/web/installer -O - -q | php -- --quiet 43 | RUN cp composer.phar /usr/local/bin/composer 44 | 45 | ENV DRUSH_VERSION=8.3.0 46 | RUN wget https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar -O - -q > /usr/local/bin/drush 47 | RUN chmod +x /usr/local/bin/composer 48 | RUN chmod +x /usr/local/bin/drush 49 | 50 | # Prepare Aegir Logs folder. 51 | RUN mkdir /var/log/aegir 52 | RUN chown aegir:aegir /var/log/aegir 53 | RUN echo 'Hello, Aegir.' > /var/log/aegir/system.log 54 | 55 | COPY httpd-foreground /usr/local/bin/httpd-foreground 56 | RUN chmod +x /usr/local/bin/httpd-foreground 57 | 58 | USER aegir 59 | WORKDIR /var/aegir 60 | VOLUME /var/aegir 61 | 62 | # docker-entrypoint.sh waits for mysql and runs hostmaster install 63 | ENTRYPOINT [] 64 | CMD ["httpd-foreground"] -------------------------------------------------------------------------------- /Dockerfile-web-ubuntu16: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | ENV DEBIAN_FRONTEND=noninteractive 3 | RUN apt-get update -qq && apt-get install -y -qq\ 4 | apache2 \ 5 | php7.0-common \ 6 | php7.0-cli \ 7 | php7.0-dev \ 8 | php7.0-fpm \ 9 | libpcre3-dev \ 10 | php7.0-gd \ 11 | php7.0-curl \ 12 | php7.0-imap \ 13 | php7.0-json \ 14 | php7.0-opcache \ 15 | php7.0-xml \ 16 | php7.0-mbstring \ 17 | php7.0-mysql \ 18 | php-sqlite3 \ 19 | php-apcu \ 20 | libapache2-mod-php \ 21 | postfix \ 22 | sudo \ 23 | rsync \ 24 | git-core \ 25 | unzip \ 26 | wget \ 27 | mysql-client 28 | 29 | # Use --build-arg option when running docker build to set these variables. 30 | # If wish to "mount" a volume to your host, set AEGIR_UID and AEGIR_GIT to your local user's UID. 31 | # There are both ARG and ENV lines to make sure the value persists. 32 | # See https://docs.docker.com/engine/reference/builder/#/arg 33 | ARG AEGIR_UID=1000 34 | ENV AEGIR_UID ${AEGIR_UID:-1000} 35 | 36 | RUN echo "Creating user aegir with UID $AEGIR_UID and GID $AEGIR_GID" 37 | 38 | RUN addgroup --gid $AEGIR_UID aegir 39 | RUN adduser --uid $AEGIR_UID --gid $AEGIR_UID --system --shell /bin/bash --home /var/aegir aegir 40 | RUN adduser aegir www-data 41 | RUN a2enmod rewrite 42 | 43 | # Save a symlink to the /var/aegir/config/docker.conf file. 44 | RUN mkdir -p /var/aegir/config 45 | RUN chown aegir:aegir /var/aegir/config -R 46 | RUN ln -sf /var/aegir/config/docker.conf /etc/apache2/conf-available/aegir.conf 47 | RUN ln -sf /etc/apache2/conf-available/aegir.conf /etc/apache2/conf-enabled/aegir.conf 48 | 49 | COPY sudoers-aegir /etc/sudoers.d/aegir 50 | RUN chmod 0440 /etc/sudoers.d/aegir 51 | 52 | RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/1b137f8bf6db3e79a38a5bc45324414a6b1f9df2/web/installer -O - -q | php -- --quiet 53 | RUN cp composer.phar /usr/local/bin/composer 54 | 55 | ENV DRUSH_VERSION=8.3.0 56 | RUN wget https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar -O - -q > /usr/local/bin/drush 57 | RUN chmod +x /usr/local/bin/composer 58 | RUN chmod +x /usr/local/bin/drush 59 | 60 | # Prepare Aegir Logs folder. 61 | RUN mkdir /var/log/aegir 62 | RUN chown aegir:aegir /var/log/aegir 63 | RUN echo 'Hello, Aegir.' > /var/log/aegir/system.log 64 | 65 | COPY httpd-foreground /usr/local/bin/httpd-foreground 66 | RUN chmod +x /usr/local/bin/httpd-foreground 67 | 68 | USER aegir 69 | WORKDIR /var/aegir 70 | VOLUME /var/aegir 71 | 72 | # docker-entrypoint.sh waits for mysql and runs hostmaster install 73 | ENTRYPOINT [] 74 | CMD ["httpd-foreground"] -------------------------------------------------------------------------------- /Dockerfile-xdebug: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster:dev 2 | 3 | USER root 4 | 5 | RUN apt-get update && \ 6 | apt-get install php5-dev -y -qq 7 | 8 | RUN yes | pecl install xdebug-2.5.5 \ 9 | && echo "zend_extension=xdebug.so" >> /etc/php5/mods-available/xdebug.ini \ 10 | && echo "xdebug.remote_host=172.17.0.1" >> /etc/php5/mods-available/xdebug.ini \ 11 | && echo "xdebug.remote_enable=on" >> /etc/php5/mods-available/xdebug.ini \ 12 | && echo "xdebug.remote_autostart=off" >> /etc/php5/mods-available/xdebug.ini \ 13 | && ln -s /etc/php5/mods-available/xdebug.ini /etc/php5/apache2/conf.d/00-xdebug.ini \ 14 | && ln -s /etc/php5/mods-available/xdebug.ini /etc/php5/cli/conf.d/00-xdebug.ini 15 | 16 | USER aegir -------------------------------------------------------------------------------- /Dockerfile-xdebug-php7: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster:php7 2 | 3 | USER root 4 | 5 | RUN apt-get update && \ 6 | apt-get install php-dev -y -qq 7 | 8 | ENV PHP_CONFIG_PATH /etc/php/7.0 9 | 10 | RUN yes | pecl install xdebug-2.7.2 \ 11 | && echo "zend_extension=xdebug.so" >> $PHP_CONFIG_PATH/mods-available/xdebug.ini \ 12 | && echo "xdebug.remote_host=172.17.0.1" >> $PHP_CONFIG_PATH/mods-available/xdebug.ini \ 13 | && echo "xdebug.remote_enable=on" >> $PHP_CONFIG_PATH/mods-available/xdebug.ini \ 14 | && echo "xdebug.remote_autostart=off" >> $PHP_CONFIG_PATH/mods-available/xdebug.ini \ 15 | && ln -s $PHP_CONFIG_PATH/mods-available/xdebug.ini $PHP_CONFIG_PATH/apache2/conf.d/00-xdebug.ini \ 16 | && ln -s $PHP_CONFIG_PATH/mods-available/xdebug.ini $PHP_CONFIG_PATH/cli/conf.d/00-xdebug.ini 17 | 18 | USER aegir -------------------------------------------------------------------------------- /Dockerfile-xdebug-php71: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster:php71 2 | 3 | USER root 4 | 5 | RUN apt-get update && \ 6 | apt-get install php-dev -y -qq 7 | 8 | ENV PHP_CONFIG_PATH /etc/php/7.1 9 | 10 | RUN yes | pecl install xdebug-2.7.2 \ 11 | && echo "zend_extension=xdebug.so" >> $PHP_CONFIG_PATH/mods-available/xdebug.ini \ 12 | && echo "xdebug.remote_host=172.17.0.1" >> $PHP_CONFIG_PATH/mods-available/xdebug.ini \ 13 | && echo "xdebug.remote_enable=on" >> $PHP_CONFIG_PATH/mods-available/xdebug.ini \ 14 | && echo "xdebug.remote_autostart=off" >> $PHP_CONFIG_PATH/mods-available/xdebug.ini \ 15 | && ln -s $PHP_CONFIG_PATH/mods-available/xdebug.ini $PHP_CONFIG_PATH/apache2/conf.d/00-xdebug.ini \ 16 | && ln -s $PHP_CONFIG_PATH/mods-available/xdebug.ini $PHP_CONFIG_PATH/cli/conf.d/00-xdebug.ini 17 | 18 | USER aegir -------------------------------------------------------------------------------- /Dockerfile-xdebug-php72: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster:php72 2 | 3 | USER root 4 | 5 | RUN apt-get update && \ 6 | apt-get install php-dev -y -qq 7 | 8 | ENV PHP_CONFIG_PATH /etc/php/7.2 9 | 10 | RUN yes | pecl install xdebug-2.7.2 \ 11 | && echo "zend_extension=xdebug.so" >> $PHP_CONFIG_PATH/mods-available/xdebug.ini \ 12 | && echo "xdebug.remote_host=172.17.0.1" >> $PHP_CONFIG_PATH/mods-available/xdebug.ini \ 13 | && echo "xdebug.remote_enable=on" >> $PHP_CONFIG_PATH/mods-available/xdebug.ini \ 14 | && echo "xdebug.remote_autostart=off" >> $PHP_CONFIG_PATH/mods-available/xdebug.ini \ 15 | && ln -s $PHP_CONFIG_PATH/mods-available/xdebug.ini $PHP_CONFIG_PATH/apache2/conf.d/00-xdebug.ini \ 16 | && ln -s $PHP_CONFIG_PATH/mods-available/xdebug.ini $PHP_CONFIG_PATH/cli/conf.d/00-xdebug.ini 17 | 18 | USER aegir -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Aegir Hosting System 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | What is Aegir? 2 | ============== 3 | 4 | Aegir is a free and open source hosting system for Drupal, CiviCRM, and Wordpress. 5 | 6 | Designed for mass Drupal hosting, Aegir can launch new sites with a single form submission or API call (See [Hosting Services](http://drupal.org/project/hosting_services). 7 | 8 | Aegir itself is built on Drupal and Drush, allowing you to tap into the large contributed module community. 9 | 10 | For more information, visit aegirproject.org 11 | 12 | How to use this image 13 | ===================== 14 | 15 | ## Manual launch: 16 | 17 | $ docker run --name database -d -e MYSQL_ROOT_PASSWORD=12345 mariadb 18 | $ docker run --name hostmaster --hostname aegir.local.computer -e MYSQL_ROOT_PASSWORD=12345 --link database:mysql -p 80:80 aegir/hostmaster 19 | 20 | ## docker-compose launch: 21 | 22 | 1. Create a docker-compose.yml file: 23 | 24 | ```yml 25 | version: '2' 26 | services: 27 | 28 | hostmaster: 29 | image: aegir/hostmaster 30 | ports: 31 | - 80:80 32 | hostname: local.computer 33 | links: 34 | - database 35 | depends_on: 36 | - database 37 | environment: 38 | MYSQL_ROOT_PASSWORD: strongpassword 39 | 40 | database: 41 | image: mariadb 42 | environment: 43 | MYSQL_ROOT_PASSWORD: strongpassword 44 | ``` 45 | 2. run `docker-compose up`. 46 | 47 | ## Development Environment 48 | 49 | We have created a development toolkit located at (https://github.com/aegir-project/development)[https://github.com/aegir-project/development]. The scripts in this folder will prepare your host machine with the source code and containers needed to run and develop Aegir. 50 | 51 | ## Important parts: 52 | 53 | - MYSQL_ROOT_PASSWORD: 12345. This must match for database and hostmaster containers. If launching in production, choose a secure password. 54 | - --hostname aegir.local.computer. The hostname of the container must be set to a fully qualified domain that resolves to the host machine. *.local.computer resolves to 127.0.0.1, so it is useful to use for launching locally. 55 | - -p 80:80. Since this one container is going to host numerous websites for you, it expects to be assigned to port 80 (unless you are hooking up another container like varnish or a load balancer on the same machine.) 56 | 57 | # Environment Variables 58 | 59 | ## AEGIR_CLIENT_NAME 60 | 61 | *Default: admin* 62 | 63 | The username of UID1 and the client node. 64 | 65 | ## AEGIR_CLIENT_EMAIL 66 | *Default: aegir@aegir.docker* 67 | 68 | The email for UID1. The welcome email for user 1 gets sent to this address. 69 | 70 | ## AEGIR_MAKEFILE 71 | *Defalt: /var/aegir/.drush/provision/aegir.make* 72 | 73 | The makefile to use for building the front-end drupal dashboard. Defaults to hostmaster. 74 | 75 | May use https://raw.githubusercontent.com/opendevshop/devshop/1.x/build-devmaster.make to build a devmaster instance. 76 | 77 | ## AEGIR_PROFILE 78 | *Default: hostmaster* 79 | 80 | The install profile to run for the drupal front-end. Defaults to hostmaster. 81 | 82 | May use "devmaster" if you used the devmaster makefile. 83 | 84 | ## AEGIR_HOSTMASTER_ROOT 85 | *Default: /var/aegir/hostmaster* 86 | 87 | The path to install hostmaster. 88 | 89 | # DEVELOPMENT 90 | 91 | # Aegir on Docker 92 | 93 | This project is an experiment to (finally) get Aegir working *inside* Docker. 94 | 95 | This is not a project to get Aegir deploying docker (yet) 96 | 97 | An official Aegir docker image will make it really easy to fire up an aegir instance for production or just to try. 98 | 99 | This image will also make contributing and testing much, much easier. 100 | 101 | ## Launching 102 | 103 | ### Requirements: 104 | 105 | - [Docker](https://docs.docker.com/engine/installation/) & [Docker Compose 2](https://docs.docker.com/compose/install/). 106 | 107 | ### Launching: 108 | 109 | 1. Clone this repo: 110 | 111 | 112 | git clone git@github.com:jonpugh/aegir-dockerfile.git 113 | 114 | 2. Change directories into the codeabase. 115 | 116 | 117 | cd aegir-dockerfile 118 | 119 | 3. Edit your `/etc/hosts` file to add the container's hostname, which is set in `docker-compose.yml` (aegir.local.computer by default). It must point at your docker host. 120 | 121 | 122 | 127.0.0.1 aegir.local.computer # If running native linux 123 | 192.168.99.100 aegir.local.computer # If running on OSx, or using default docker-machine 124 | 125 | 4. Build the image. (Optional) 126 | 127 | If you made your own changes to the dockerfile, you can build your own image: 128 | 129 | docker build -t aegir/hostmaster -f Dockerfile.ubuntu.14.04 . 130 | 131 | 4. Run docker compose up. 132 | 133 | 134 | docker-compose up 135 | 136 | If this is the first time, it will download the base images and hostmaster will install. If not, the database will be read from the volume as already having installed, so it will just run the drush commands to prepare the server. 137 | 138 | You will see the hostmaster install success output: 139 | 140 | hostmaster_1 | ============================================================================== 141 | hostmaster_1 | 142 | hostmaster_1 | 143 | hostmaster_1 | Congratulations, Aegir has now been installed. 144 | hostmaster_1 | 145 | hostmaster_1 | You should now log in to the Aegir frontend by opening the following link in your web browser: 146 | hostmaster_1 | 147 | hostmaster_1 | http://aegir.local.computer/user/reset/1/1468333477/iKwXpRJ7xhHeiPwhiE2oe5UcswlLeS_fZVALR9EvKZg/login 148 | hostmaster_1 | 149 | hostmaster_1 | 150 | hostmaster_1 | ============================================================================== 151 | 152 | Visit that link, but change the port if you had to change it in docker-compose. 153 | 154 | http://aegir.local.computer:12345/user/reset/1/abscdf....abcde/login 155 | 156 | That's it! 157 | 158 | You can access the container via terminal with docker exec: 159 | 160 | docker exec -ti aegirdocker_hostmaster_1 bash 161 | 162 | Since the user of the container is already set to `aegir`, you can just run "bash". 163 | 164 | ## Tech Notes 165 | 166 | ### Developing Dockerfiles 167 | 168 | It can be confusing and monotonous to build the image, docker compose up, kill, remove, then rebuild, repeat... 169 | 170 | So I use the following command to ensure fully deleted containers and volumes, a rebuilt image, and a quick exit if things fail (--abort-on-container-exit) 171 | 172 | docker-compose kill ; docker-compose rm -vf ; docker build -t aegir/hostmaster ../ ; docker-compose up --abort-on-container-exit 173 | 174 | You only need to run this full command if you change the Dockerfile or the docker-entrypoint-*.sh files. 175 | 176 | If you are only changing the docker-compose.yml file, sometimes you can just run: 177 | 178 | docker-compose restart 179 | 180 | Or you can kill then up the containers if you need the "CMD" or "command" to run again: 181 | 182 | docker-compose kill; docker-compose up 183 | 184 | ### Hostnames 185 | 186 | The trickiest part of getting Aegir Hostmaster running in docker was the hostname situation. Aegir installs itself based on the servers hostname. This hostname is used for the server nodes and for the drupal front-end, 187 | 188 | I've worked around that for now by using a docker-entrypoint.sh file that does the hostmaster installation at run time. 189 | 190 | ### Services 191 | 192 | A stock hostmaster requires mysql, apache and supervisor in order to have a responsive queue. The "docker way" is to separate services out. 193 | 194 | I was able to use an external database container for MySQL. 195 | 196 | Apache automatically gets started when Hostmaster is verified, so docker-entrypoint.sh doesn't have to do it. 197 | 198 | Finally, instead of Supervisor, I realized we could use docker itself to run `drush @hostmaster hosting-queued`, so that is at the end of docker-entrypoint.sh. 199 | 200 | Turns out, this results in a REALLY fast Aegir server! 201 | 202 | # Next Steps 203 | 204 | 1. Figure out how to install Hostmaster in the image, then use docker-entrypoint.sh to change the hostname and root mysql password dynamically. 205 | UPDATES: 206 | - If we keep the database as a second container, then hostmaster must always be installed at runtime, because the DB doesn't even exist until then. 207 | - If we want to release Aegir as a self-contained product, we should think about figuring out how to include everything in one container. See Rancher Server as an example of this: their container includes a MySQL server: https://github.com/rancher/rancher/tree/master/server 208 | 2. Publish to http://hub.docker.com. DONE: https://hub.docker.com/r/aegir/hostmaster/ 209 | 3. Create multiple tagged versions for various OSes, PHP versions, and Aegir releases. 210 | -------------------------------------------------------------------------------- /docker-compose-tests.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | 5 | hostmaster: 6 | image: aegir/hostmaster:dev 7 | command: 8 | - run-tests.sh 9 | ports: 10 | - 80:80 11 | hostname: aegir.local.computer 12 | links: 13 | - database 14 | depends_on: 15 | - database 16 | environment: 17 | VIRTUAL_HOST: aegir.local.computer 18 | MYSQL_ROOT_PASSWORD: strongpassword 19 | 20 | database: 21 | image: mariadb 22 | 23 | # Disable logging for this container, for testing environment. 24 | logging: 25 | driver: "none" 26 | environment: 27 | MYSQL_ROOT_PASSWORD: strongpassword 28 | 29 | # These options are needed for Drupal 7.50 and up for full UTF-8 support. 30 | # See https://www.drupal.org/node/2754539 31 | command: mysqld --innodb-large-prefix --innodb-file-format=barracuda --innodb-file-per-table -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | # This compose file is just an example. Create your own to launch your own Aegir cluster 4 | 5 | services: 6 | 7 | hostmaster: 8 | image: aegir/hostmaster 9 | ports: 10 | - 80:80 11 | hostname: aegir.local.computer 12 | environment: 13 | MYSQL_ROOT_PASSWORD: strongpassword 14 | 15 | database: 16 | image: mariadb 17 | logging: 18 | driver: none 19 | environment: 20 | MYSQL_ROOT_PASSWORD: strongpassword -------------------------------------------------------------------------------- /docker-entrypoint-queue.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | HOSTNAME=`hostname --fqdn` 4 | 5 | # Returns true once @hostmaster hosting_queued module is enabled. 6 | # Thanks to http://askubuntu.com/questions/697798/shell-script-how-to-run-script-after-mysql-is-ready 7 | hostmaster_ready() { 8 | drush @hostmaster status > /dev/null 2>&1 9 | } 10 | 11 | function hostmaster_pm_list_ready() { 12 | drush @hostmaster pm-list > /dev/null 2>&1 13 | } 14 | 15 | function hostmaster_queued_ready() { 16 | drush @hostmaster pm-list --pipe --type=module --status=enabled --no-core | grep 'hosting_queued' &> /dev/null 2>&1 17 | } 18 | 19 | while !(hostmaster_ready) 20 | do 21 | sleep 5 22 | echo "waiting for Hostmaster site to come online..." 23 | done 24 | 25 | echo "Hostmaster detected!" 26 | 27 | while !(hostmaster_pm_list_ready) 28 | do 29 | echo "drush pm-list command failed... waiting." 30 | sleep 5 31 | done 32 | 33 | while !(hostmaster_queued_ready) 34 | do 35 | sleep 3 36 | echo "waiting for Hostmaster Queue Daemon module to be enabled..." 37 | done 38 | 39 | echo "Hostmaster Queue ready! running drush @hostmaster hosting-queued" 40 | 41 | # Run whatever is the Docker CMD. 42 | drush @hostmaster hosting-queued -v -------------------------------------------------------------------------------- /docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | HOSTNAME=`hostname --fqdn` 4 | 5 | echo 'ÆGIR | Hello! ' 6 | echo 'ÆGIR | When the database is ready, we will install Aegir with the following options:' 7 | echo "ÆGIR | -------------------------" 8 | echo "ÆGIR | Hostname: $HOSTNAME" 9 | echo "ÆGIR | Version: $AEGIR_VERSION" 10 | echo "ÆGIR | Provision Version: $PROVISION_VERSION" 11 | echo "ÆGIR | Database Host: $AEGIR_DATABASE_SERVER" 12 | echo "ÆGIR | Web Server Type: $AEGIR_HTTP_SERVICE_TYPE" 13 | echo "ÆGIR | Makefile: $AEGIR_MAKEFILE" 14 | echo "ÆGIR | Profile: $AEGIR_PROFILE" 15 | echo "ÆGIR | Root: $AEGIR_HOSTMASTER_ROOT" 16 | echo "ÆGIR | Client Name: $AEGIR_CLIENT_NAME" 17 | echo "ÆGIR | Client Email: $AEGIR_CLIENT_EMAIL" 18 | echo "ÆGIR | Working Copy: $AEGIR_WORKING_COPY" 19 | echo "ÆGIR | -------------------------" 20 | echo "ÆGIR | TIP: To receive an email when the container is ready, add the AEGIR_CLIENT_EMAIL environment variable to your docker-compose.yml file." 21 | echo "ÆGIR | -------------------------" 22 | echo 'ÆGIR | Checking /var/aegir...' 23 | ls -lah /var/aegir 24 | echo "ÆGIR | -------------------------" 25 | echo 'ÆGIR | Checking /var/aegir/.drush/...' 26 | ls -lah /var/aegir/.drush 27 | echo "ÆGIR | -------------------------" 28 | echo 'ÆGIR | Checking drush status...' 29 | drush status 30 | echo "ÆGIR | -------------------------" 31 | 32 | 33 | # Use drush help to determnine if Provision is installed anywhere on the system. 34 | drush help provision-save > /dev/null 2>&1 35 | if [ ${PIPESTATUS[0]} == 0 ]; then 36 | echo "ÆGIR | Provision Commands found." 37 | else 38 | echo "ÆGIR | Provision Commands not found! Installing..." 39 | drush dl provision-$PROVISION_VERSION --destination=/var/aegir/.drush/commands -y 40 | fi 41 | 42 | echo "ÆGIR | -------------------------" 43 | echo "ÆGIR | Starting apache2 now to reduce downtime." 44 | sudo apache2ctl graceful 45 | 46 | # Returns true once mysql can connect. 47 | # Thanks to http://askubuntu.com/questions/697798/shell-script-how-to-run-script-after-mysql-is-ready 48 | mysql_ready() { 49 | mysqladmin ping --host=$AEGIR_DATABASE_SERVER --user=root --password=$MYSQL_ROOT_PASSWORD > /dev/null 2>&1 50 | } 51 | 52 | while !(mysql_ready) 53 | do 54 | sleep 3 55 | echo "ÆGIR | Waiting for database host '$AEGIR_DATABASE_SERVER' ..." 56 | done 57 | 58 | echo "ÆGIR | Database active! Checking for Hostmaster Install..." 59 | 60 | # Check if @hostmaster is already set and accessible. 61 | drush @hostmaster vget site_name > /dev/null 2>&1 62 | if [ ${PIPESTATUS[0]} == 0 ]; then 63 | echo "ÆGIR | Hostmaster site found... Checking for upgrade platform..." 64 | 65 | # Only upgrade if site not found in current containers platform. 66 | if [ ! -d "$AEGIR_HOSTMASTER_ROOT/sites/$HOSTNAME" ]; then 67 | echo "ÆGIR | Site not found at $AEGIR_HOSTMASTER_ROOT/sites/$HOSTNAME, upgrading!" 68 | echo "ÆGIR | Running 'drush @hostmaster hostmaster-migrate $HOSTNAME $AEGIR_HOSTMASTER_ROOT -y'...!" 69 | drush @hostmaster hostmaster-migrate $HOSTNAME $AEGIR_HOSTMASTER_ROOT -y 70 | else 71 | echo "ÆGIR | Site found at $AEGIR_HOSTMASTER_ROOT/sites/$HOSTNAME" 72 | fi 73 | 74 | # if @hostmaster is not accessible, install it. 75 | else 76 | echo "ÆGIR | Hostmaster not found. Continuing with install!" 77 | 78 | echo "ÆGIR | -------------------------" 79 | echo "ÆGIR | Running: drush cc drush" 80 | drush cc drush 81 | 82 | echo "ÆGIR | -------------------------" 83 | echo "ÆGIR | Running: drush hostmaster-install" 84 | 85 | set -ex 86 | drush hostmaster-install -y --strict=0 $HOSTNAME \ 87 | --aegir_db_host=$AEGIR_DATABASE_SERVER \ 88 | --aegir_db_pass=$MYSQL_ROOT_PASSWORD \ 89 | --aegir_db_port=3306 \ 90 | --aegir_db_user=root \ 91 | --aegir_db_grant_all_hosts=1 \ 92 | --aegir_host=$HOSTNAME \ 93 | --client_name=$AEGIR_CLIENT_NAME \ 94 | --client_email=$AEGIR_CLIENT_EMAIL \ 95 | --http_service_type=$AEGIR_HTTP_SERVICE_TYPE \ 96 | --makefile=$AEGIR_MAKEFILE \ 97 | --profile=$AEGIR_PROFILE \ 98 | --root=$AEGIR_HOSTMASTER_ROOT \ 99 | --working-copy=$AEGIR_WORKING_COPY 100 | 101 | fi 102 | 103 | sleep 3 104 | 105 | 106 | # Exit on the first failed line. 107 | set -e 108 | 109 | echo "ÆGIR | Running 'drush cc drush' ... " 110 | drush cc drush 111 | 112 | echo "ÆGIR | Enabling hosting queued..." 113 | drush @hostmaster en hosting_queued -y 114 | 115 | ls -lah /var/aegir 116 | 117 | # We need a ULI here because aegir only outputs one on install, not on subsequent verify. 118 | echo "ÆGIR | Getting a new login link ... " 119 | drush @hostmaster uli 120 | 121 | echo "ÆGIR | Clear Hostmaster caches ... " 122 | drush cc drush 123 | drush @hostmaster cc all 124 | 125 | # Run whatever is the Docker CMD, typically drush @hostmaster hosting-queued 126 | echo "ÆGIR | Running Docker Command '$@' ..." 127 | 128 | exec "$@" -------------------------------------------------------------------------------- /httpd-foreground: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copied from official httpd container: https://github.com/docker-library/httpd/blob/fa5223d83a5225aa3fd5b23229b785c7764142bf/2.2/httpd-foreground 4 | 5 | set -e 6 | # 7 | ## Apache gets grumpy about PID files pre-existing 8 | #rm -f /usr/local/apache2/logs/apache2.pid 9 | #source /etc/apache2/envvars 10 | #exec apache2 -DFOREGROUND 11 | 12 | # Add symlink from our server's config to the apache include target. 13 | echo "/var/aegir/config:" 14 | ls -la /var/aegir/config/ 15 | 16 | echo "/var/aegir/config/server_$AEGIR_SERVER_NAME:" 17 | ls -la /var/aegir/config/server_$AEGIR_SERVER_NAME 18 | 19 | # If there are no platforms assigned to the server, docker.conf and the docker config folders are never created. 20 | if [ ! -f '/var/aegir/config/server_$AEGIR_SERVER_NAME/docker.conf' ]; then 21 | touch /var/aegir/config/server_$AEGIR_SERVER_NAME/docker.conf 22 | fi 23 | 24 | ln -sf /var/aegir/config/server_$AEGIR_SERVER_NAME/docker.conf /var/aegir/config/docker.conf 25 | 26 | sudo /usr/sbin/apache2ctl start 27 | tail -f /var/log/aegir/system.log -------------------------------------------------------------------------------- /releases/Dockerfile-3.10: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster 2 | 3 | ENV AEGIR_VERSION 7.x-3.10 4 | ENV PROVISION_VERSION 7.x-3.10 5 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 6 | 7 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/$AEGIR_PROFILE-$AEGIR_VERSION 8 | 9 | # Prepare next hostmaster platform. 10 | # This is done in the Dockerfile so that we can ship upgrades with the codebase, then run hostmaster-migrate when a new 11 | # version is detected. 12 | 13 | RUN drush make $AEGIR_MAKEFILE $AEGIR_HOSTMASTER_ROOT 14 | RUN drush dl provision-$AEGIR_VERSION --destination=/var/aegir/.drush/commands -y -------------------------------------------------------------------------------- /releases/Dockerfile-3.11: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster 2 | 3 | ENV AEGIR_VERSION 7.x-3.11 4 | ENV PROVISION_VERSION 7.x-3.11 5 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 6 | 7 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/$AEGIR_PROFILE-$AEGIR_VERSION 8 | 9 | # Prepare next hostmaster platform. 10 | # This is done in the Dockerfile so that we can ship upgrades with the codebase, then run hostmaster-migrate when a new 11 | # version is detected. 12 | 13 | RUN drush make $AEGIR_MAKEFILE $AEGIR_HOSTMASTER_ROOT 14 | RUN drush dl provision-$AEGIR_VERSION --destination=/var/aegir/.drush/commands -y 15 | -------------------------------------------------------------------------------- /releases/Dockerfile-3.120: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster 2 | 3 | ENV AEGIR_VERSION 7.x-3.120 4 | ENV PROVISION_VERSION 7.x-3.120 5 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 6 | 7 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/$AEGIR_PROFILE-$AEGIR_VERSION 8 | 9 | # Prepare next hostmaster platform. 10 | # This is done in the Dockerfile so that we can ship upgrades with the codebase, then run hostmaster-migrate when a new 11 | # version is detected. 12 | 13 | RUN drush make $AEGIR_MAKEFILE $AEGIR_HOSTMASTER_ROOT 14 | RUN drush dl provision-$AEGIR_VERSION --destination=/var/aegir/.drush/commands -y 15 | -------------------------------------------------------------------------------- /releases/Dockerfile-3.130: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster 2 | 3 | ENV AEGIR_VERSION 7.x-3.130 4 | ENV PROVISION_VERSION 7.x-3.130 5 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 6 | 7 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/$AEGIR_PROFILE-$AEGIR_VERSION 8 | 9 | # Prepare next hostmaster platform. 10 | # This is done in the Dockerfile so that we can ship upgrades with the codebase, then run hostmaster-migrate when a new 11 | # version is detected. 12 | 13 | RUN drush make $AEGIR_MAKEFILE $AEGIR_HOSTMASTER_ROOT 14 | RUN drush dl provision-$AEGIR_VERSION --destination=/var/aegir/.drush/commands -y 15 | -------------------------------------------------------------------------------- /releases/Dockerfile-3.14: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster 2 | 3 | ENV AEGIR_VERSION 7.x-3.144 4 | ENV PROVISION_VERSION 7.x-3.144 5 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 6 | 7 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/$AEGIR_PROFILE-$AEGIR_VERSION 8 | 9 | # Prepare next hostmaster platform. 10 | # This is done in the Dockerfile so that we can ship upgrades with the codebase, then run hostmaster-migrate when a new 11 | # version is detected. 12 | 13 | RUN drush make $AEGIR_MAKEFILE $AEGIR_HOSTMASTER_ROOT 14 | RUN drush dl provision-$AEGIR_VERSION --destination=/var/aegir/.drush/commands -y 15 | -------------------------------------------------------------------------------- /releases/Dockerfile-3.15: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster 2 | 3 | ENV AEGIR_VERSION 7.x-3.151 4 | ENV PROVISION_VERSION 7.x-3.151 5 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 6 | 7 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/$AEGIR_PROFILE-$AEGIR_VERSION 8 | 9 | # Prepare next hostmaster platform. 10 | # This is done in the Dockerfile so that we can ship upgrades with the codebase, then run hostmaster-migrate when a new 11 | # version is detected. 12 | 13 | RUN drush make $AEGIR_MAKEFILE $AEGIR_HOSTMASTER_ROOT 14 | RUN drush dl provision-$AEGIR_VERSION --destination=/var/aegir/.drush/commands -y 15 | -------------------------------------------------------------------------------- /releases/Dockerfile-3.6: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster 2 | 3 | ENV AEGIR_VERSION 7.x-3.6 4 | ENV PROVISION_VERSION 7.x-3.6 5 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 6 | 7 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/$AEGIR_PROFILE-$AEGIR_VERSION 8 | 9 | # Prepare next hostmaster platform. 10 | # This is done in the Dockerfile so that we can ship upgrades with the codebase, then run hostmaster-migrate when a new 11 | # version is detected. 12 | 13 | RUN drush make $AEGIR_MAKEFILE $AEGIR_HOSTMASTER_ROOT 14 | RUN drush dl provision-$AEGIR_VERSION --destination=/var/aegir/.drush/commands -y -------------------------------------------------------------------------------- /releases/Dockerfile-3.7: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster 2 | 3 | ENV AEGIR_VERSION 7.x-3.7 4 | ENV PROVISION_VERSION 7.x-3.7 5 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 6 | 7 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/$AEGIR_PROFILE-$AEGIR_VERSION 8 | 9 | # Prepare next hostmaster platform. 10 | # This is done in the Dockerfile so that we can ship upgrades with the codebase, then run hostmaster-migrate when a new 11 | # version is detected. 12 | 13 | RUN drush make $AEGIR_MAKEFILE $AEGIR_HOSTMASTER_ROOT 14 | RUN drush dl provision-$AEGIR_VERSION --destination=/var/aegir/.drush/commands -y -------------------------------------------------------------------------------- /releases/Dockerfile-3.8: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster 2 | 3 | ENV AEGIR_VERSION 7.x-3.8 4 | ENV PROVISION_VERSION 7.x-3.8 5 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 6 | 7 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/$AEGIR_PROFILE-$AEGIR_VERSION 8 | 9 | # Prepare next hostmaster platform. 10 | # This is done in the Dockerfile so that we can ship upgrades with the codebase, then run hostmaster-migrate when a new 11 | # version is detected. 12 | 13 | RUN drush make $AEGIR_MAKEFILE $AEGIR_HOSTMASTER_ROOT 14 | RUN drush dl provision-$AEGIR_VERSION --destination=/var/aegir/.drush/commands -y -------------------------------------------------------------------------------- /releases/Dockerfile-3.9: -------------------------------------------------------------------------------- 1 | FROM aegir/hostmaster 2 | 3 | ENV AEGIR_VERSION 7.x-3.9 4 | ENV PROVISION_VERSION 7.x-3.9 5 | ENV AEGIR_MAKEFILE http://cgit.drupalcode.org/provision/plain/aegir-release.make?h=$AEGIR_VERSION 6 | 7 | ENV AEGIR_HOSTMASTER_ROOT /var/aegir/$AEGIR_PROFILE-$AEGIR_VERSION 8 | 9 | # Prepare next hostmaster platform. 10 | # This is done in the Dockerfile so that we can ship upgrades with the codebase, then run hostmaster-migrate when a new 11 | # version is detected. 12 | 13 | RUN drush make $AEGIR_MAKEFILE $AEGIR_HOSTMASTER_ROOT 14 | RUN drush dl provision-$AEGIR_VERSION --destination=/var/aegir/.drush/commands -y -------------------------------------------------------------------------------- /run-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # If /var/aegir/tests does't already exist, clone it. 6 | echo "run-tests.sh | Starting run-tests.sh..." 7 | 8 | if [ ! -d /var/aegir/tests ]; then 9 | echo "run-tests.sh | /var/aegir/tests not found. Cloning... " 10 | git clone https://github.com/aegir-project/tests.git /var/aegir/tests 11 | fi 12 | 13 | cd /var/aegir/tests 14 | 15 | echo "run-tests.sh | Running composer update..." 16 | composer update 17 | 18 | echo "run-tests.sh | Running composer install..." 19 | composer install 20 | 21 | echo "run-tests.sh | Running bin/behat..." 22 | bin/behat --colors -------------------------------------------------------------------------------- /sudoers-aegir: -------------------------------------------------------------------------------- 1 | Defaults:aegir !requiretty 2 | aegir ALL=NOPASSWD: /usr/sbin/apache2ctl 3 | --------------------------------------------------------------------------------