Public | Automated Build

Last pushed: 2 years ago
FROM offbyone/supervisord:1.1.0 MAINTAINER Craig Kimerer <> # Install requirements RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:git-core/ppa && apt-get update && apt-get upgrade -y RUN apt-get install -y ssh wget vim less zip cron lsof git sendmail nodejs-legacy npm python-pygments subversion RUN npm install ws # Add users RUN echo "git:x:2000:2000:user for phabricator ssh:/srv/phabricator:/bin/bash" >> /etc/passwd RUN echo "phab-daemon:x:2001:2000:user for phabricator daemons:/srv/phabricator:/bin/bash" >> /etc/passwd RUN echo "wwwgrp-phabricator:!:2000:nginx" >> /etc/group # Set up the Phabricator code base RUN mkdir /srv/phabricator RUN chown git:wwwgrp-phabricator /srv/phabricator USER git WORKDIR /srv/phabricator RUN git clone git:// RUN git clone git:// RUN git clone git:// # Setup wait-for-it to wait for the db socket to be ready before plowing through USER root RUN mkdir /srv/wait-for-it RUN chown git:wwwgrp-phabricator /srv/wait-for-it USER git WORKDIR /srv/wait-for-it RUN git clone . # Install requirements USER root WORKDIR / RUN apt-get -y install nginx php5 php5-fpm php5-mcrypt php5-mysql php5-gd php5-dev php5-curl php-apc php5-cli php5-json php5-ldap python-Pygments nodejs sudo # Expose Nginx on port 80 and 443 EXPOSE 80 EXPOSE 443 # Expose Aphlict (notification server) on 22280 EXPOSE 22280 # Expose SSH port 24 (Git SSH will be on 22, regular SSH on 24) EXPOSE 24 # Helper scripts around running & upgrading phabricator ADD /srv/phabricator/ ADD /srv/phabricator/ ADD / # Add service config files ADD /etc/nginx/ ADD /etc/nginx/ ADD fastcgi.conf /etc/nginx/ ADD php-fpm.conf /etc/php5/fpm/ ADD php.ini /etc/php5/fpm/ # Add necessary git entries entries RUN echo "git ALL=(phab-daemon) SETENV: NOPASSWD: /usr/bin/git-upload-pack, /usr/bin/git-receive-pack" > /etc/sudoers.d/git # Add Supervisord config files ADD /etc/supervisor/conf.d/ ADD /etc/supervisor/conf.d/ ADD /etc/supervisor/conf.d/ ADD /etc/supervisor/conf.d/ ADD /etc/supervisor/conf.d/ # Add the cron for upgrading phabricator ADD upgrade-phabricator.cron /etc/cron.d/phabricator # Move the default SSH to port 24 RUN sed -i 's/Port 22/Port 24/g' /etc/ssh/sshd_config RUN mkdir -p /var/repo/ RUN chown phab-daemon:2000 /var/repo/ # Configure Phabricator SSH service RUN mkdir /etc/phabricator-ssh RUN mkdir /var/run/sshd/ RUN chmod 0755 /var/run/sshd ADD sshd_config.phabricator /etc/phabricator-ssh/ ADD /etc/phabricator-ssh/ RUN chown root:root /etc/phabricator-ssh/* CMD ./ && supervisord
Source Repository