Skip to content

Commit

Permalink
Reduced size on Docker image and speed up of start container.
Browse files Browse the repository at this point in the history
  • Loading branch information
roquie committed Jun 16, 2018
1 parent 36f7052 commit 4c23c92
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN apt-get update \
git \
make \
gettext-base \
python-setuptools \
nginx=${NGINX_VERSION} \
php7.2-fpm \
php7.2-cli \
Expand All @@ -35,21 +34,21 @@ RUN apt-get update \
php7.2-intl \
php7.2-xml \
php7.2-redis \
&& easy_install supervisor supervisor-stdout \
&& echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d \
&& git clone https://github.com/ztombol/varrick.git \
&& cd varrick; make -i install; cd ..; rm -rf varrick \
&& apt-get purge -y git make \
&& chown -R nginx:nginx /etc/nginx /etc/php/7.2/fpm \
&& rm -rf /etc/nginx/conf.d/default.conf \
&& rm /usr/share/nginx/html/* \
&& apt-get purge -y git make python python3; apt-get autoremove -y \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

ADD conf/supervisord.conf /etc/supervisord.conf
ADD conf/nginx/* /etc/nginx/
ADD conf/php-fpm /etc/php/7.2/fpm/

COPY --chown=nginx:nginx app /srv/www
COPY --from=ochinchina/supervisord:latest /usr/local/bin/supervisord /usr/local/bin/supervisord
ADD conf/supervisord.conf /etc/supervisord.conf

USER nginx

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Kill features:
* Used the env variables for configure many parameters at start.
* Fully compatible with PaaS-solutions like as Heroku, Flynn, Deis Workflow, Dokku and many others.
* Internal port of nginx is taken from `$PORT` env variable.
* Used Supervisord written on Golang.
* Small image size (for Debian-based of course).

**Every week travis auto build the docker image and push to the registry.**

Expand Down
1 change: 0 additions & 1 deletion conf/nginx/nginx.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ http {
client_header_buffer_size 5K;
client_body_timeout $NGINX_BODY_TIMEOUT;
client_header_timeout $NGINX_HEADER_TIMEOUT;
keepalive_timeout 30;

include /etc/nginx/host.conf;
}
2 changes: 1 addition & 1 deletion conf/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ varrick -x /etc/php/7.2/fpm/pool.d/www.conf.tmpl /etc/php/7.2/fpm/pool.d
varrick -x /etc/php/7.2/fpm/php.ini.tmpl /etc/php/7.2/fpm

# Start supervisord and services
/usr/local/bin/supervisord -n -c /etc/supervisord.conf
/usr/local/bin/supervisord -c /etc/supervisord.conf

0 comments on commit 4c23c92

Please sign in to comment.