Skip to content

Commit

Permalink
Merge pull request #5 from wfjsw/base
Browse files Browse the repository at this point in the history
Base Image Done. #4 solved.
  • Loading branch information
wfjsw committed Aug 16, 2015
2 parents 0698357 + d3506c1 commit 9d088d5
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 147 deletions.
56 changes: 29 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
FROM debian:jessie

# Using nodesource and debian jessie packages instead of compiling from scratch
# Using debian jessie packages instead of compiling from scratch
RUN DEBIAN_FRONTEND=noninteractive \
echo "APT::Install-Recommends \"0\";" >> /etc/apt/apt.conf.d/02recommends && \
echo "APT::Install-Suggests \"0\";" >> /etc/apt/apt.conf.d/02recommends && \
apt-get -qq update && \
apt-get -qq install \
apt-get -q -y update && \
apt-get -q -y install \
ca-certificates nginx php5-fpm=5.* php5-curl php5-readline php5-mcrypt php5-mysql php5-apcu php5-cli \
wget sqlite libsqlite3-dev curl supervisor cron php5-pgsql && \
apt-get clean && apt-get autoremove -qq && \
wget sqlite git libsqlite3-dev curl supervisor cron php5-pgsql php5-sqlite && \
apt-get clean && apt-get autoremove -q && \
rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man /tmp/*

COPY docker/supervisord.conf /etc/supervisor/supervisord.conf
COPY docker/entrypoint.sh /sbin/entrypoint.sh
RUN cd /var/www/html ;\
wget https://github.com/cachethq/Cachet/archive/v1.1.1.tar.gz ;\
tar xzvf v1.1.1.tar.gz --strip-components=1
COPY docker/php-fpm-pool.conf /etc/php5/fpm/pool.d/www.conf

# COPY docker/entrypoint.sh /sbin/entrypoint.sh
WORKDIR /var/www/html/

# copy the various nginx and supervisor conf (to handle both fpm and nginx)
RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf ;\
echo "daemon off;" >> /etc/nginx/nginx.conf ;\
mv /var/www/html/docker/php-fpm-pool.conf /etc/php5/fpm/pool.d/www.conf ;\
rm -f /etc/nginx/sites-enabled/* ;\
rm -f /etc/nginx/conf.d/* ;\
mv /var/www/html/docker/nginx-site.conf /etc/nginx/conf.d/default.conf ;\
mv /var/www/html/docker/.env.docker /var/www/html/.env ;\
rm -r /var/www/html/docker ;\
chown -R www-data /var/www/html ;\
curl -sS https://getcomposer.org/installer | php && php composer.phar install --no-dev -o

EXPOSE 8000

COPY docker/crontab /etc/cron.d/artisan-schedule
RUN chmod 0644 /etc/cron.d/artisan-schedule
RUN touch /var/log/cron.log

CMD ["/sbin/entrypoint.sh"]
RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf && \
echo "daemon off;" >> /etc/nginx/nginx.conf && \
rm -f /etc/nginx/sites-enabled/* && \
rm -f /etc/nginx/conf.d/* && \
# mv /var/www/html/docker/.env.docker /var/www/html/.env && \
# ^ Move this to upper level of image
chown -R www-data /var/www/html && \
curl -sS https://getcomposer.org/installer | php

COPY docker/nginx-site.conf /etc/nginx/conf.d/default.conf

# EXPOSE 8000

# COPY docker/crontab /etc/cron.d/artisan-schedule
# RUN chmod 0644 /etc/cron.d/artisan-schedule
# RUN touch /var/log/cron.log

# ^ Also these

CMD ["/bin/bash"]
# ^ From debian:latest, had better not run it directly
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
Cachet-Docker
# Cachet-Docker-Base

Run Cachet in a Docker container.

# docker-compose
```bash
docker-compose up
```
Base Image for cachethq/Docker

Contains configured Debian, PHP and NGINX environment
18 changes: 0 additions & 18 deletions docker-compose.yml

This file was deleted.

27 changes: 0 additions & 27 deletions docker/.env.docker

This file was deleted.

2 changes: 0 additions & 2 deletions docker/crontab

This file was deleted.

66 changes: 0 additions & 66 deletions docker/entrypoint.sh

This file was deleted.

0 comments on commit 9d088d5

Please sign in to comment.