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

Update to php 7.0 and phusion/baseimage:latest #1

Merged
merged 1 commit into from
Aug 21, 2017
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
28 changes: 14 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Pinned to 0.9.18 (Ubuntu 14.04 LTS) to enable PHP5
FROM phusion/baseimage:0.9.18
FROM phusion/baseimage
MAINTAINER gabriel schubiner <gabriel.schubiner@gmail.com>

# Installation
RUN apt-get update && apt-get install -y --no-install-recommends \
apache2 \
libapache2-mod-php5 \
libapache2-mod-php \
build-essential \
php5 \
php5-dev \
php5-mysqlnd \
php5-imap \
php5-cli \
php \
php-dev \
php-mysqlnd \
php-imap \
php-cli \
php-pear \
php-apc \
php5-gd \
php5-memcached \
php-apcu \
php-gd \
php-memcached \
python-pip \
mysql-client \
ssmtp \
Expand Down Expand Up @@ -45,14 +45,14 @@ ENV PHP_SENDMAIL_PATH /usr/sbin/ssmtp -t
RUN sed -i \
-e 's/^;session.save_path/session.save_path/g' \
-e "s!^;sendmail_path =.*\$!sendmail_path = $PHP_SENDMAIL_PATH!g" \
/etc/php5/apache2/php.ini
/etc/php/7.0/apache2/php.ini
ADD ./assets/update_php_vars.sh /usr/bin/
RUN chmod +x /usr/bin/update_php_vars.sh
RUN update_php_vars.sh
RUN php5enmod imap
RUN phpenmod imap
RUN pecl install -Z uploadprogress && \
echo 'extension=uploadprogress.so' >/etc/php5/mods-available/uploadprogress.ini && \
php5enmod uploadprogress
echo 'extension=uploadprogress.so' >/etc/php/7.0/mods-available/uploadprogress.ini && \
phpenmod uploadprogress

# Default ENV vars
## Apache
Expand Down
6 changes: 3 additions & 3 deletions assets/update_php_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ sed -i \
-e "s/^max_execution_time.*\$/max_execution_time = $PHP_MAX_EXECUTION_TIME/g" \
-e "s/^session.save_handler.*\$/session.save_handler = $PHP_SESSION_SAVE_CACHE/g" \
-e "s!^sendmail_path.*\$!sendmail_path = $PHP_SENDMAIL_PATH!g" \
/etc/php5/apache2/php.ini
/etc/php/7.0/apache2/php.ini

if [ "$PHP_SESSION_SAVE_CACHE" == "memcached" ]; then
sed -i -e "s!^session.save_path.*\$!session.save_path = \"localhost:11211\"!g" /etc/php5/apache2/php.ini
sed -i -e "s!^session.save_path.*\$!session.save_path = \"localhost:11211\"!g" /etc/php/7.0/apache2/php.ini
else
sed -i -e "s!^session.save_path.*\$!session.save_path = \"/var/lib/php5\"!g" /etc/php5/apache2/php.ini
sed -i -e "s!^session.save_path.*\$!session.save_path = \"/var/lib/php\"!g" /etc/php/7.0/apache2/php.ini
fi