Skip to content

Commit

Permalink
Fixed invalid user/group for PHP-FPM in Dockerfile + Add MySQL instal…
Browse files Browse the repository at this point in the history
…lation to Dockerfile
  • Loading branch information
wagnert committed Apr 27, 2017
1 parent 037d583 commit 5f8a4db
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Version 1.1.4-beta8

## Bugfixes

* Fixed invalid user/group for PHP-FPM in Dockerfile

## Features

* Add MySQL installation to Dockerfile

# Version 1.1.4-beta7

## Bugfixes
Expand Down
15 changes: 13 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ MAINTAINER Tim Wagner <tw@appserver.io>
ENV APPSERVER_RUNTIME_BUILD_VERSION 1.1.6-44

# update the sources list
RUN apt-get update \
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5 \

# add the MySQL repository to the sources list
&& echo "deb http://repo.mysql.com/apt/debian/ jessie mysql-5.6" >> /etc/apt/sources.list.d/mysql.list \

# update the sources list
&& apt-get update \

# install the necessary packages
&& DEBIAN_FRONTEND=noninteractive apt-get install supervisor wget git -y python-pip \
&& DEBIAN_FRONTEND=noninteractive apt-get install supervisor wget git mysql-server -y python-pip \

# install the Python package to redirect the supervisord output
&& pip install supervisor-stdout
Expand Down Expand Up @@ -61,6 +67,10 @@ RUN ln -s /opt/appserver/bin/composer.phar /usr/local/bin/composer \
# modify user-rights in configuration
&& sed -i "s/www-data/root/g" etc/appserver/appserver.xml \

# replace the default user/group for the PHP-FPM configuration
&& sed -i "s/user = www-data/user = root/g" etc/php-fpm.conf \
&& sed -i "s/group = www-data/group = root/g" etc/php-fpm.conf \

# modify system logger configuration
&& sed -i "s/var\/log\/appserver-errors.log/php:\/\/stderr/g" etc/appserver/appserver.xml \

Expand All @@ -84,6 +94,7 @@ RUN ln -s /opt/appserver/bin/composer.phar /usr/local/bin/composer \

# modify the error_log of PHP-FPM php.ini to /dev/stderr
&& sed -i "s/\/opt\/appserver\/var\/log\/php-fpm-fcgi_errors.log/\/proc\/self\/fd\/2/g" etc/php-fpm-fcgi.ini \
&& sed -i "s/;always_populate_raw_post_data = On/always_populate_raw_post_data = -1/g" etc/php-fpm-fcgi.ini \

# create a symlink to the supervisord configuration file
&& ln -s /opt/appserver/etc/supervisor/conf.d/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
Expand Down

0 comments on commit 5f8a4db

Please sign in to comment.