-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile-debian.template
57 lines (45 loc) · 1.77 KB
/
Dockerfile-debian.template
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
FROM php:%%DOCKER_PHP_TAG%%
# Install ext-zip
RUN apt-get update && apt-get install -y --no-install-recommends \
zlib1g-dev \
&& docker-php-ext-install -j$(nproc) zip \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
# Install composer dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
subversion \
&& apt-get clean \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
# 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
# Composer install (https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md)
RUN set -xe; \
\
php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');"; \
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', '/tmp/composer-setup.php');"); \
\
if [ "$ACTUAL_SIGNATURE" != "%%COMPOSER_SIG%%" ]; then \
>&2 echo 'ERROR: Invalid installer signature'; \
exit 1; \
fi; \
\
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer --version="%%COMPOSER_VERSION%%"; \
rm /tmp/composer-setup.php
# Install prestissimo
RUN composer global require "hirak/prestissimo:^0.3"
# Set up the volumes and working directory
VOLUME ["/app"]
WORKDIR /app
# Set entrypoint
ENTRYPOINT ["composer"]