diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..cb3b888 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +onyx2/log/*.log diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2aa91d --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# onyx2 files +onyx2/cache/*.cache.php +onyx2/config/root.xml +onyx2/log/php.log +onyx2/log/*.log diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..834aaa6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,34 @@ +# DOCKER-VERSION 1.3.2 + +FROM debian:wheezy +MAINTAINER Pierre-Olivier Mercier + +# Install packages #################################################### + +RUN apt-get -y update && \ + apt-get install -y \ + nginx-light \ + php5-fpm \ + php5-gd \ + && \ + apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +WORKDIR /srv/www/pa4home + +EXPOSE 80 + +COPY entrypoint.sh /root/entrypoint.sh +ENTRYPOINT ["/root/entrypoint.sh"] + +RUN ln -sf /srv/www/pa4home/onyx/config/root.sample.xml /srv/www/pa4home/onyx/config/root.xml + +# Webserver configuration ############################################# + +COPY nginx.conf /etc/nginx/sites-available/default + +COPY htdocs /srv/www/pa4home/htdocs/ +COPY onyx2 /srv/www/pa4home/onyx2/ + +CMD service nginx start && \ + service php5-fpm start && \ + /bin/bash diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..459c753 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +BASEDIR=/srv/www/pa4home + +# Creating directory and set permissions +mkdir -p ${BASEDIR}/onyx/log +chown -R www-data:www-data ${BASEDIR}/onyx/log + +# Update database profile +cat < ${BASEDIR}/onyx/db/docker.profile.php && +sampledocker