Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
dockerfiles/nginx-php/Dockerfile
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
44 lines (33 sloc)
1.49 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM phusion/baseimage:0.9.15 | |
# Ensure UTF-8 | |
RUN locale-gen en_US.UTF-8 | |
ENV LANG en_US.UTF-8 | |
ENV LC_ALL en_US.UTF-8 | |
ENV HOME /root | |
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh | |
CMD ["/sbin/my_init"] | |
# Nginx-PHP Installation | |
RUN apt-get update | |
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y vim curl wget build-essential python-software-properties | |
RUN add-apt-repository -y ppa:ondrej/php5 | |
RUN add-apt-repository -y ppa:nginx/stable | |
RUN apt-get update | |
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --force-yes php5-cli php5-fpm php5-mysql php5-pgsql php5-sqlite php5-curl\ | |
php5-gd php5-mcrypt php5-intl php5-imap php5-tidy | |
RUN sed -i "s/;date.timezone =.*/date.timezone = UTC/" /etc/php5/fpm/php.ini | |
RUN sed -i "s/;date.timezone =.*/date.timezone = UTC/" /etc/php5/cli/php.ini | |
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y nginx | |
RUN echo "daemon off;" >> /etc/nginx/nginx.conf | |
RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf | |
RUN sed -i "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/" /etc/php5/fpm/php.ini | |
RUN mkdir -p /var/www | |
ADD build/default /etc/nginx/sites-available/default | |
RUN mkdir /etc/service/nginx | |
ADD build/nginx.sh /etc/service/nginx/run | |
RUN chmod +x /etc/service/nginx/run | |
RUN mkdir /etc/service/phpfpm | |
ADD build/phpfpm.sh /etc/service/phpfpm/run | |
RUN chmod +x /etc/service/phpfpm/run | |
EXPOSE 80 | |
# End Nginx-PHP | |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |