Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mlespiau committed Dec 10, 2016
1 parent 41b4799 commit 93c3ad7
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM php:5.6.27-fpm-alpine
RUN apk upgrade --update && apk add \
coreutils \
freetype-dev \
libjpeg-turbo-dev \
libltdl \
libmcrypt-dev \
libpng-dev \
antiword \
poppler-utils \
html2text \
alpine-sdk \
autoconf \
automake
RUN cd ~ && \
wget http://www.gnu.org/software/unrtf/unrtf-0.21.9.tar.gz && \
tar xzvf unrtf-0.21.9.tar.gz && \
cd unrtf-0.21.9/ && \
./bootstrap && \
./configure && \
make && \
make install
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j5 mysql gd ldap soap zip
ADD scripts/install-composer.sh /opt/install-composer.sh
RUN dos2unix /opt/install-composer.sh && \
chmod +x /opt/install-composer.sh && \
/opt/install-composer.sh && \
mv /var/www/html/composer.phar /usr/local/bin/composer
ENV DOCKERIZE_VERSION v0.2.0
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
17 changes: 17 additions & 0 deletions scripts/install-composer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

EXPECTED_SIGNATURE=$(wget http://composer.github.io/installer.sig -O - -q)
php -r "copy('http://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")

if [ "$EXPECTED_SIGNATURE" == "$ACTUAL_SIGNATURE" ]
then
php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
exit $RESULT
else
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
exit 1
fi

0 comments on commit 93c3ad7

Please sign in to comment.