Update docker

Change:
* Add default configuration files.
* Update composer-setup.php.
* Remove composer-setup.php after intallation.
This commit is contained in:
sc0Vu 2018-12-13 11:18:48 +08:00
parent 77f20738aa
commit 60bbb2c17a
5 changed files with 3862 additions and 5 deletions

View File

@ -2,7 +2,8 @@ FROM php:7.1.14-alpine
MAINTAINER Peter Lai <alk03073135@gmail.com>
ADD composer-setup.php composer-setup.php
COPY composer-setup.php composer-setup.php
# COPY php.ini-production $PHP_INI_DIR/php.ini
RUN apk update && \
apk add git
@ -12,6 +13,7 @@ RUN apk update && \
# Install composer
RUN php composer-setup.php && \
php composer-setup.php --install-dir=/usr/bin --filename=composer
php composer-setup.php --install-dir=/usr/bin --filename=composer && \
php -r "unlink('composer-setup.php');"
WORKDIR /app

View File

@ -2,7 +2,8 @@ FROM php:7.2.2-alpine
MAINTAINER Peter Lai <alk03073135@gmail.com>
ADD composer-setup.php composer-setup.php
COPY composer-setup.php composer-setup.php
# COPY php.ini-production $PHP_INI_DIR/php.ini
RUN apk update && \
apk add git
@ -12,6 +13,7 @@ RUN apk update && \
# Install composer
RUN php composer-setup.php && \
php composer-setup.php --install-dir=/usr/bin --filename=composer
php composer-setup.php --install-dir=/usr/bin --filename=composer && \
php -r "unlink('composer-setup.php');"
WORKDIR /app

View File

@ -2,4 +2,4 @@
copy('https://getcomposer.org/installer', 'composer-setup.php');
if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;
if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff