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

add pecl yaml library, fixed composer hash #15

Closed
wants to merge 1 commit into from
Closed
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
25 changes: 22 additions & 3 deletions php56/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,26 @@ FROM alpine:edge
MAINTAINER Andy Postnikov <[email protected]>

ENV PHPRUN_DEPS \
autoconf \
curl \
gcc \
g++ \
libxml2-dev \
make \
mariadb-client \
openssl \
patch
patch \
yaml-dev

RUN apk add --no-cache \
ENV TERM xterm

RUN apk add --no-cache --upgrade \
php5 \
php5-apcu \
php5-bcmath \
php5-ctype \
php5-curl \
php5-dev \
php5-dom \
php5-gd \
php5-json \
Expand All @@ -22,10 +31,20 @@ RUN apk add --no-cache \
php5-pcntl \
php5-pdo_mysql \
php5-pdo_sqlite \
php5-pear \
php5-phar \
php5-xml \
php5-zlib \
$PHPRUN_DEPS \

# Install PHP extensions through Pecl
&& sed -ie 's/-n//g' /usr/bin/pecl \
&& pecl install yaml-1.3.0 \
&& echo 'extension=xml.so' > /etc/php5/conf.d/xml.ini \
&& echo 'extension=yaml.so' > /etc/php5/conf.d/yaml.ini \

# Cleanup after phpizing
&& rm -rf /usr/include/php /usr/lib/php/build /usr/lib/php5/modules/*.a \

&& rm -fr /var/cache/apk/* \
&& wget https://getcomposer.org/installer -O - | php -- --filename=composer \
--install-dir=/usr/bin \
Expand Down
30 changes: 24 additions & 6 deletions php7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,66 @@ ENV PHPIZE_DEPS \
g++ \
gcc \
libc-dev \
libxml2-dev \
make \
pkgconf \
re2c
re2c \
yaml-dev

# add php7-xdebug if needed
ENV PHPRUN_DEPS \
curl \
mariadb-client \
patch

RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
ENV TERM xterm

RUN apk add --no-cache --upgrade \
php7 \
php7-apcu \
php7-bcmath \
php7-ctype \
php7-curl \
php7-dev \
php7-dom \
php7-gd \
php7-json \
php7-mbstring \
php7-mcrypt \
php7-opcache \
php7-openssl \
php7-pear \
php7-pcntl \
php7-pdo_mysql \
php7-pdo_sqlite \
php7-phar \
php7-session \
php7-xml \
php7-zlib \
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
php7-apcu \

$PHPIZE_DEPS \

# Install PHP extensions through Pecl
&& sed -ie 's/-n//g' /usr/bin/pecl \
&& pecl install yaml-2.0.0 \
&& echo 'extension=yaml.so' > /etc/php7/conf.d/yaml.ini \

&& ln -s /usr/bin/php7 /usr/bin/php \
&& php7 -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php7 -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php7 -r "if (hash_file('SHA384', 'composer-setup.php') === 'aa96f26c2b67226a324c27919f1eb05f21c248b987e6195cad9690d5c1ff713d53020a02ac8c217dbf90a7eacc9d141d') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php7 composer-setup.php \
--install-dir=/usr/bin \
--filename=composer \
&& php7 -r "unlink('composer-setup.php');" \
&& php7 -r "copy('http://files.drush.org/drush.phar', '/usr/bin/drush');" \
&& chmod +x /usr/bin/drush \
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
&& apk add --no-cache \
$PHPRUN_DEPS \
&& rm -rf /var/cache/apk/*
&& rm -rf /var/cache/apk/* \

# Cleanup after phpizing
&& rm -rf /usr/include/php /usr/lib/php/build /usr/lib/php7/modules/*.a

COPY php.ini /etc/php7/conf.d/xx-drupal.ini

Expand Down