Created
April 5, 2016 17:24
-
-
Save Crispy1975/bc1a3a5ae07075eb04cf603215a1f952 to your computer and use it in GitHub Desktop.
Dockerfile
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 ubuntu:trusty | |
MAINTAINER Crispy1975 "https://example.com" | |
# Kill old apt cache | |
RUN rm -R /var/lib/apt/lists/* -vf | |
# Update and install | |
RUN apt-get update \ | |
&& apt-get install -y htop vim supervisor mcrypt bash-completion cron bash rsyslog nginx \ | |
&& apt-get install -y git-core curl openssh-client \ | |
&& apt-get -y upgrade \ | |
&& apt-get -y install -f | |
# Copy repo access keys over | |
RUN echo "daemon off;" >> /etc/nginx/nginx.conf | |
# correcting bashrc for bash-completion | |
RUN printf "\n\nif [ -f /etc/bash_completion ] && ! shopt -oq posix; then\n\t. /etc/bash_completion\nfi" >> /root/.bashrc | |
RUN ( mkdir -p /var/log/supervisor ; mkdir -p /log/ ; mkdir -p /data/http ; exit 0 ) | |
RUN chown www-data:www-data /data/http | |
# Adding default supervisor file to container | |
ADD files/supervisor.conf /etc/supervisor/conf.d/ | |
# Adding rsyslogs for cronjob | |
ADD files/cron-rsyslog.conf /etc/rsyslog.d/60-cron.conf | |
# Clean out the apt cache | |
RUN apt-get clean | |
# Copy site files | |
ADD . /var/www | |
# Copy nginx config | |
ADD files/nginx.conf /etc/nginx/sites-enabled/default | |
EXPOSE 80 | |
# For running supervisor container at starting of docker container | |
CMD ( /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment