Skip to content

Instantly share code, notes, and snippets.

@mikekunze
Last active December 26, 2015 10:39
Show Gist options
  • Save mikekunze/7137759 to your computer and use it in GitHub Desktop.
Save mikekunze/7137759 to your computer and use it in GitHub Desktop.
This dockerfile will spawn up a simple drupal container for getting started with drupal core. You must provide your own main.cf file for postfix. mailname is a file that contains your hostname. start.coffee is the coffee-script file that is run that spawns necessary processes and creates the database. the nodebuntu image has node, npm, and coffe…
FROM nodebuntu
RUN apt-get -y install apache2 php5 php5-mysql mysql-server php5-gd wget postfix
RUN rm /etc/postfix/main.cf
ADD ./main.cf /etc/postfix/main.cf
ADD ./mailname /etc/mailname
ADD ./start.coffee /start.coffee
RUN wget http://ftp.drupal.org/files/projects/drupal-7.23.tar.gz
RUN tar zxvf drupal-7.23.tar.gz
RUN rm -rf /var/www
RUN mv drupal-7.23 /var/www
RUN mkdir /var/www/sites/default/files
RUN chown www-data:www-data /var/www/sites/default/files
RUN cd /var/www/sites/default; cp default.settings.php settings.php
RUN chown www-data:www-data /var/www/sites/default/settings.php
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
EXPOSE 80
CMD coffee /start.coffee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment