kubernetes #comment add composer in the fpm/worker images

This commit is contained in:
Alexandre BRACH
2019-10-18 16:09:08 +02:00
parent ad76d73e64
commit 5f1f8b3b43
3 changed files with 22 additions and 8 deletions

View File

@@ -141,6 +141,11 @@ RUN apt-get update \
&& docker-php-source delete \
&& rm -rf /var/lib/apt/lists/*
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& php -r "unlink('composer-setup.php');"
RUN mkdir /entrypoint /var/alchemy \
&& useradd -u 1000 app \
&& mkdir -p /home/app/.composer \

View File

@@ -63,14 +63,12 @@ The docker distribution come with 3 differents containers :
## How to build
The three images can be built respectively with these commands :
You can build all the images with the following command at the root directory :
# nginx server
docker build --target phraseanet-nginx -t local/phraseanet-nginx .
./build <TAG>
# php-fpm application
docker build --target phraseanet-fpm -t local/phraseanet-fpm .
# worker
docker build --target phraseanet-worker -t local/phraseanet-worker .
It will build and tag the following images :
local/phraseanet-worker:<TAG>
local/phraseanet-fpm:<TAG>
local/phraseanet-nginx:<TAG>

11
build.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
# nginx server
docker build --target phraseanet-nginx -t local/phraseanet-nginx:$1 .
# php-fpm application
docker build --target phraseanet-fpm -t local/phraseanet-fpm:$1 .
# worker
docker build --target phraseanet-worker -t local/phraseanet-worker:$1 .