Created
December 29, 2014 13:32
-
-
Save arduanov/542431827b8547a70586 to your computer and use it in GitHub Desktop.
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 debian:jessie | |
ENV POSTGRESQL_DB NONE | |
ENV POSTGRESQL_USER docker | |
# Install packages | |
RUN apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
cron openssh-server supervisor \ | |
nginx php5-fpm pwgen curl \ | |
php5-curl php5-gd \ | |
mc nano htop \ | |
postgresql | |
# Configure sshd | |
RUN mkdir -p /var/run/sshd | |
RUN sed -i 's/^PermitRootLogin without-password$/PermitRootLogin yes/g' /etc/ssh/sshd_config | |
RUN echo "root:linux" | chpasswd | |
# Configure supervisord | |
RUN sed -i 's/^\(\[supervisord\]\)$/\1\nnodaemon=true/' /etc/supervisor/supervisord.conf | |
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
# php-fpm config | |
RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf | |
# nginx config | |
RUN echo "daemon off;" >> /etc/nginx/nginx.conf | |
# postgresql | |
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.4/main/pg_hba.conf | |
RUN sed -i -e "s/^#listen_addresses.*=.*/listen_addresses = '*'/" /etc/postgresql/9.4/main/postgresql.conf | |
#RUN sed -i -e "s/^data_directory.*=.*$/data_directory = '\/data'/" /etc/postgresql/9.4/main/postgresql.conf | |
EXPOSE 5432 | |
EXPOSE 22 | |
EXPOSE 80 443 | |
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment