Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base Image #5

Merged
merged 7 commits into from
Aug 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.