Dockerfile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Copyright 2016 The Kubernetes Authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. FROM ubuntu:14.04
  15. # Install all the required packages.
  16. RUN apt-get update
  17. RUN apt-get -y install \
  18. git apache2 dpkg-dev python-pygments \
  19. php5 php5-mysql php5-gd php5-dev php5-curl php-apc php5-cli php5-json php5-xhprof
  20. RUN a2enmod rewrite
  21. RUN apt-get source php5
  22. RUN (cd `ls -1F | grep '^php5-.*/$'`/ext/pcntl && phpize && ./configure && make && sudo make install)
  23. # Load code source.
  24. RUN mkdir /home/www-data
  25. RUN cd /home/www-data && git clone https://github.com/phacility/libphutil.git
  26. RUN cd /home/www-data && git clone https://github.com/phacility/arcanist.git
  27. RUN cd /home/www-data && git clone https://github.com/phacility/phabricator.git
  28. RUN chown -R www-data /home/www-data
  29. RUN chgrp -R www-data /home/www-data
  30. ADD 000-default.conf /etc/apache2/sites-available/000-default.conf
  31. ADD run.sh /run.sh
  32. RUN chmod a+x /*.sh
  33. # Run Apache2.
  34. EXPOSE 80
  35. CMD ["/run.sh"]