File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ services:
1919 container_name : " php"
2020 build :
2121 context : .
22- dockerfile : ./php.dockerfile
22+ dockerfile : ${PHP_DOCKER_FILE}
2323 args :
2424 PHP_DOCKER_VERSION : ${PHP_DOCKER_VERSION}
2525 volumes :
Original file line number Diff line number Diff line change 1+ ARG PHP_DOCKER_VERSION
2+ FROM php:${PHP_DOCKER_VERSION}-cli
3+
4+ RUN sed -i s/httpredir.debian.org/archive.debian.org/g /etc/apt/sources.list
5+ RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
6+
7+ RUN sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list
8+
9+ RUN sed -i '/stretch-updates/d' /etc/apt/sources.list
10+ RUN sed -i '/jessie-updates/d' /etc/apt/sources.list
11+ RUN sed -i '/jessie\/ updates/d' /etc/apt/sources.list
12+
13+ RUN apt update --allow-unauthenticated
14+
15+ RUN apt install --allow-unauthenticated -y --force-yes unzip ca-certificates
16+
17+ RUN docker-php-ext-install pcntl > /dev/null
18+
19+ RUN curl -o /usr/bin/composer https://getcomposer.org/composer-1.phar && chmod +x /usr/bin/composer
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ __DIR__=$(cd `dirname $0`; pwd)
44
55cd $__DIR__
66
7+ if [[ ` expr $PHP_DOCKER_VERSION \< 7` -eq 0 ]]; then
8+ export PHP_DOCKER_FILE=" php.dockerfile"
9+ else
10+ export PHP_DOCKER_FILE=" php-5.dockerfile"
11+ fi
12+
713containerName=$1
814
915docker-compose up -d $containerName \
You can’t perform that action at this time.
0 commit comments