Skip to content

Commit 7fbee87

Browse files
authored
Rebuild of Dockerfile
Refactored the Dockerfile to use wget for fetching simplesamlphp package and combined many of the RUN commands into single exec chained RUN commands (to minimise docker image layering).
1 parent 41031aa commit 7fbee87

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

Dockerfile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@ MAINTAINER Ian Blenke <ian@blenke.com>
33

44
env VERSION 1.13.2
55

6-
RUN curl https://github.com/simplesamlphp/simplesamlphp/releases/download/v$VERSION/simplesamlphp-$VERSION.tar.gz | tar xvzf - --strip-components 1 -C /var/www/html
7-
86
WORKDIR /var/www/html
97

10-
RUN cp -r config-templates/* config/
11-
RUN cp -r metadata-templates/* metadata/
8+
RUN apt-get update -y && \
9+
apt-get install -y wget && \
10+
wget https://github.com/simplesamlphp/simplesamlphp/releases/download/v$VERSION/simplesamlphp-$VERSION.tar.gz && \
11+
tar xvzf simplesamlphp-$VERSION.tar.gz --strip-components 1 -C /var/www/html
12+
13+
RUN cp -r config-templates/* config/ && cp -r metadata-templates/* metadata/
1214

1315
VOLUME /var/www/html/config
1416
VOLUME /var/www/html/metadata
1517

1618
# Install the gmp and mcrypt extensions
17-
RUN apt-get update -y
18-
RUN apt-get install -y libgmp-dev re2c libmhash-dev libmcrypt-dev file
19-
RUN ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/
20-
RUN docker-php-ext-configure gmp
21-
RUN docker-php-ext-install gmp
22-
RUN docker-php-ext-configure mcrypt
23-
RUN docker-php-ext-install mcrypt
24-
25-
RUN echo extension=gmp.so > $PHP_INI_DIR/conf.d/gmp.ini
26-
RUN echo extension=mcrypt.so > $PHP_INI_DIR/conf.d/mcrypt.ini
19+
RUN apt-get update -y && \
20+
apt-get install -y libgmp-dev re2c libmhash-dev libmcrypt-dev file && \
21+
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ && \
22+
docker-php-ext-configure gmp && \
23+
docker-php-ext-install gmp && \
24+
docker-php-ext-configure mcrypt && \
25+
docker-php-ext-install mcrypt && \
26+
echo extension=gmp.so > $PHP_INI_DIR/conf.d/gmp.ini && \
27+
echo extension=mcrypt.so > $PHP_INI_DIR/conf.d/mcrypt.ini
2728

2829
RUN curl -sS https://getcomposer.org/installer | php
2930
RUN php composer.phar install
30-

0 commit comments

Comments
 (0)