This repository has been archived by the owner on Mar 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathDockerfile
60 lines (50 loc) · 1.83 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Composer Docker Container
# Base Dockerfile: composer/base-alpine
FROM php:7.0-alpine
MAINTAINER Rob Loach <[email protected]>
# Packages
RUN apk --update --no-cache add \
autoconf \
build-base \
curl \
git \
subversion \
freetype-dev \
libjpeg-turbo-dev \
libmcrypt-dev \
libpng-dev \
libbz2 \
libstdc++ \
libxslt-dev \
openldap-dev \
make \
unzip \
wget && \
docker-php-ext-install bcmath mcrypt zip bz2 mbstring pcntl xsl && \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
docker-php-ext-install gd && \
docker-php-ext-configure ldap --with-libdir=lib/ && \
docker-php-ext-install ldap && \
apk del build-base
RUN echo "@edge http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
apk add -U --no-cache php7-pear@edge
# Memory Limit
RUN echo "memory_limit=-1" > $PHP_INI_DIR/conf.d/memory-limit.ini
# Time Zone
RUN echo "date.timezone=${PHP_TIMEZONE:-UTC}" > $PHP_INI_DIR/conf.d/date_timezone.ini
# Register the COMPOSER_HOME environment variable
ENV COMPOSER_HOME /composer
# Add global binary directory to PATH and make sure to re-export it
ENV PATH /composer/vendor/bin:$PATH
# Allow Composer to be run as root
ENV COMPOSER_ALLOW_SUPERUSER 1
# Setup the Composer installer
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
&& curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \
&& php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }"
# Set up the volumes and working directory
VOLUME ["/app"]
WORKDIR /app
# Set up the command arguments
CMD ["-"]
ENTRYPOINT ["composer", "--ansi"]