diff --git a/DOCKER.md b/DOCKER.md index 623b253..1414ad2 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -5,6 +5,7 @@ - [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 - [pluie/alpine-apache-fpm][7] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 Fpm - [pluie/alpine-symfony][6] ( ~ 82 MB ) Symfony2.8 or 3.1 + - [pluie/alpine-apache-php7][8] ( ~ 50 MB ) Apache/2.4.25 Php/7.0.15 - [pluie/alpine-mysql][4] ( ~172 MB ) MariaDb/10.1.14 - [docker tips][5] @@ -162,3 +163,4 @@ docker run --name symfony --restart=always \ [7]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-fpm [5]: https://github.com/pluie-org/docker-images/blob/master/DOCKER.md [6]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony + [8]: https://github.com/pluie-org/docker-images/tree/master/pluie/7alpine-php diff --git a/README.md b/README.md index 653e108..ca81ed8 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ various based images for Docker - [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 - [pluie/alpine-apache-fpm][7] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 Fpm - [pluie/alpine-symfony][6] ( ~ 82 MB ) Symfony2.8 or 3.1 + - [pluie/alpine-apache-php7][8] ( ~ 50 MB ) Apache/2.4.25 Php/7.0.15 - [pluie/alpine-mysql][4] ( ~172 MB ) MariaDb/10.1.14 - [docker tips][5] @@ -79,3 +80,4 @@ you can keep same __build__ script in any project [7]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-fpm [5]: https://github.com/pluie-org/docker-images/blob/master/DOCKER.md [6]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony + [8]: https://github.com/pluie-org/docker-images/tree/master/pluie/7alpine-php diff --git a/pluie/alpine-apache-fpm/Dockerfile b/pluie/alpine-apache-fpm/Dockerfile index 27778ea..9922e5c 100644 --- a/pluie/alpine-apache-fpm/Dockerfile +++ b/pluie/alpine-apache-fpm/Dockerfile @@ -13,7 +13,7 @@ ENV SHENV_NAME=ApacheFpm \ WWW_DIR=www \ WWW_INDEX=index.php \ FIX_OWNERSHIP=1 \ - TZ=Europe/Paris + TZ=Europe/Paris EXPOSE 80 diff --git a/pluie/alpine-apache-fpm/README.md b/pluie/alpine-apache-fpm/README.md index 041ea54..3c5dc8d 100644 --- a/pluie/alpine-apache-fpm/README.md +++ b/pluie/alpine-apache-fpm/README.md @@ -5,6 +5,7 @@ - [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 - [pluie/alpine-apache-fpm][7] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 Fpm - [pluie/alpine-symfony][6] ( ~ 82 MB ) Symfony2.8 or 3.1 + - [pluie/alpine-apache-php7][8] ( ~ 50 MB ) Apache/2.4.25 Php/7.0.15 - [pluie/alpine-mysql][4] ( ~172 MB ) MariaDb/10.1.14 - [docker tips][5] @@ -20,7 +21,7 @@ Extend pluie/alpine with __apache 2.4.23__ and __php 5.6.24__ with FPM ## ENV variables ``` - HTTP_SERVER_NAME=apache.docker # apache ServerName + HTTP_SERVER_NAME=fpm.docker # apache ServerName WWW_DIR=www # DocumentRoot relative to volume WWW_INDEX=index.php # DirectoryIndex FIX_OWNERSHIP=1 # @@ -30,7 +31,7 @@ Extend pluie/alpine with __apache 2.4.23__ and __php 5.6.24__ with FPM ``` SHENV_CTX=LOCAL # LOCAL|INT|PROD change context bg color - SHENV_NAME=Apache # container name + SHENV_NAME=ApacheFpm # container name SHENV_COLOR=67 # ANSI EXTENDED COLOR CODE TZ=Europe/Paris # TIMEZONE ``` @@ -66,17 +67,20 @@ by default it use the apache rewrite module to redirect all uri to entry point $ chdir to your project directory ``` -$ docker run --name afpm -it --link=mysql:db1 -v $(pwd):/app pluie/alpine-apache-fpm +$ docker run --name afpm -it --link=mysql:db -v $(pwd):/app pluie/alpine-apache-fpm ``` or ``` -$ docker run --name afpm -d --link=mysql:db1 -e HTTP_SERVER_NAME=yourServerName -v $(pwd):/app pluie/alpine-apache-fpm +$ docker run --name afpm -d --link=mysql:db -e HTTP_SERVER_NAME=yourServerName -v $(pwd):/app pluie/alpine-apache-fpm ``` ## Controling http server ``` +# reload +$ docker exec -it afpm "httpd -k graceful" +# restart $ docker exec -it afpm "httpd -k restart" ``` for more commands : @@ -91,3 +95,4 @@ $ docker exec -it afpm "httpd -h" [7]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-fpm [5]: https://github.com/pluie-org/docker-images/blob/master/DOCKER.md [6]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony + [8]: https://github.com/pluie-org/docker-images/tree/master/pluie/7alpine-php diff --git a/pluie/alpine-apache-fpm/files.tar b/pluie/alpine-apache-fpm/files.tar index cec39a3..c5eb4bc 100644 Binary files a/pluie/alpine-apache-fpm/files.tar and b/pluie/alpine-apache-fpm/files.tar differ diff --git a/pluie/alpine-apache-php7/.gitignore b/pluie/alpine-apache-php7/.gitignore new file mode 100644 index 0000000..ee50cfe --- /dev/null +++ b/pluie/alpine-apache-php7/.gitignore @@ -0,0 +1 @@ +files.tar diff --git a/pluie/alpine-apache-php7/Dockerfile b/pluie/alpine-apache-php7/Dockerfile new file mode 100644 index 0000000..ea1aa8b --- /dev/null +++ b/pluie/alpine-apache-php7/Dockerfile @@ -0,0 +1,20 @@ +# @app pluie/alpine-apache +# @author a-Sansara https://git.pluie.org/pluie/docker-images + +FROM pluie/alpine + +MAINTAINER a-Sansara https://github.com/a-sansara + +ADD files.tar /scripts + +ENV SHENV_NAME=Php7 \ + SHENV_COLOR=67 \ + HTTP_SERVER_NAME=test.docker \ + WWW_DIR=www \ + WWW_INDEX=index.php \ + FIX_OWNERSHIP=1 \ + TZ=Europe/Paris + +EXPOSE 80 + +RUN bash /scripts/install.sh diff --git a/pluie/alpine-apache-php7/README.md b/pluie/alpine-apache-php7/README.md new file mode 100644 index 0000000..dd66735 --- /dev/null +++ b/pluie/alpine-apache-php7/README.md @@ -0,0 +1,94 @@ +# pluie/alpine-apache + +- [index][1] +- [pluie/alpine][2] ( < 10 MB ) Alpine/3.4 + - [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 + - [pluie/alpine-apache-fpm][7] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 Fpm + - [pluie/alpine-symfony][6] ( ~ 82 MB ) Symfony2.8 or 3.0 + - [pluie/alpine-apache-php7][8] ( ~ 50 MB ) Apache/2.4.25 Php/7.0.15 + - [pluie/alpine-mysql][4] ( ~172 MB ) Mysql/5.5.47 ( MariaDB ) +- [docker tips][5] + +Extend pluie/alpine with __apache 2.4.25__ and __php 7.0.15__ + +- error log are attached to stdout +- no need port redirection +- you can use env var at container creation : __HTTP_SERVER_NAME__ (default : site.docker ortherwise edit /app/vhost later) +- you can still use ever your local http & sql server while your container(s) are running + + +## Image Size + +- image ~ 82 MB + +## ENV variables + +``` + HTTP_SERVER_NAME=site.docker # apache ServerName + WWW_DIR=www # DocumentRoot relative to volume + WWW_INDEX=index.php # DirectoryIndex + FIX_OWNERSHIP=1 # +``` + +### Inherit ENV variables + +``` + SHENV_CTX=LOCAL # LOCAL|INT|PROD change context bg color + SHENV_NAME=Php7 # container name + SHENV_COLOR=67 # ANSI EXTENDED COLOR CODE + TZ=Europe/Paris # TIMEZONE +``` + +## Image Volumes + +__/app__ directory is a docker volume bind to your app project (silex/symfony etc) + +__/app/$WWW_DIR__ is the documentRoot. +put only your entry point and static files to the documentRoot directory, no your app sources +(__/app__ directory is design for this). + +__/app/vhost__ is your app vhost configuration file (with a serverName directive). +by default it use the apache rewrite module to redirect all uri to entry point $WWW_INDEX + +``` +/app/ # your application directory + | + |---- $WWW_DIR/ # documentRoot + | + |---- vhost # apache app vhost +``` + + +## Image Usage + +chdir to your project directory +``` +$ docker run --name php7 -it --link=mysql:db -v $(pwd):/app pluie/alpine-apache +``` +or +``` +$ docker run --name php7 -it --link=mysql:db -e HTTP_SERVER_NAME=yourServerName -v $(pwd):/app pluie/alpine-apache-php7 +``` + + +## Controling http server + +``` +# reload +$ docker exec -it php7 "httpd -k graceful" +# restart +$ docker exec -it php7 "httpd -k restart" +``` +for more commands : +``` +$ docker exec -it php7 "httpd -h" +``` + + [1]: https://github.com/pluie-org/docker-images + [2]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine + [3]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache + [4]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-mysql + [7]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-fpm + [5]: https://github.com/pluie-org/docker-images/blob/master/DOCKER.md + [6]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony + [8]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-php7 diff --git a/pluie/alpine-apache-php7/build b/pluie/alpine-apache-php7/build new file mode 100755 index 0000000..09b3da8 --- /dev/null +++ b/pluie/alpine-apache-php7/build @@ -0,0 +1,22 @@ +#!/bin/bash +# @app pluie/alpine-apache +# @author a-Sansara https://git.pluie.org/pluie/docker-images + + Ctitle="\033[1;38;5;15;1;48;5;30m" + Citem="\033[1;38;5;36m" + Coff="\033[m" + DOCKDIR=$(dirname "$(readlink -f ${BASH_SOURCE[0]})") +DOCKBUILD=$(basename $DOCKDIR) + DOCKREPO=$(basename $(dirname $DOCKDIR)) + DOCKTAG=${1:-"latest"} + TMPPWD=$(pwd) + indent=" " +cd $DOCKDIR +echo -e "\n ${Ctitle} Preparing files : ${Coff}${Citem}\n" + +tar -cvf files.tar *.sh pre-init.d/ install.d/ | sed "s/^/${indent}↠ /" + +echo -e "\n ${Ctitle} Proceed Dockerfile build : ${Coff}\n +" +docker build --force-rm -t ${DOCKREPO}/${DOCKBUILD}:${DOCKTAG} . | sed "s/^/${indent}/" +cd $TMPPWD diff --git a/pluie/alpine-apache-php7/install.d/00-repo.sh b/pluie/alpine-apache-php7/install.d/00-repo.sh new file mode 100644 index 0000000..0868a3b --- /dev/null +++ b/pluie/alpine-apache-php7/install.d/00-repo.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# @app pluie/alpine-apache-php7 +# @author a-Sansara https://git.pluie.org/pluie/docker-images + +echo "http://dl-cdn.alpinelinux.org/alpine/edge/community +http://dl-cdn.alpinelinux.org/alpine/edge/main +http://dl-cdn.alpinelinux.org/alpine/edge/testing +" > /etc/apk/repositories diff --git a/pluie/alpine-apache-php7/install.d/10-apache.sh b/pluie/alpine-apache-php7/install.d/10-apache.sh new file mode 100755 index 0000000..cb0c278 --- /dev/null +++ b/pluie/alpine-apache-php7/install.d/10-apache.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# @app pluie/alpine-apache +# @author a-Sansara https://git.pluie.org/pluie/docker-images + +apk --update add apache2 apache2-proxy \ +php7-apache2 php7-mbstring php7-session php7-phar php7-zlib php7-zip php7-ctype \ +php7-mysqli php7-xml php7-pdo_mysql php7-opcache php7-pdo php7-json php7-curl \ +php7-gd php7-mcrypt php7-openssl php7-\dom \ +# php-pdo_odbc php-soap php-pgsql diff --git a/pluie/alpine-apache-php7/install.d/50-fix-apache.sh b/pluie/alpine-apache-php7/install.d/50-fix-apache.sh new file mode 100755 index 0000000..59afa2e --- /dev/null +++ b/pluie/alpine-apache-php7/install.d/50-fix-apache.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# @app pluie/alpine-apache +# @author a-Sansara https://git.pluie.org/pluie/docker-images + +function a2setModule(){ + local enable=${1:-''} + local path=${3:-'/etc/apache2/httpd.conf'} + local scom='' + local rcom='\#' + if [ ! -z $1 ] && [ ! -z "$2" ]; then + if [ "$enable" = 1 ]; then + scom='\#' + rcom='' + fi + echo "$2" + sed -i "s#${scom}LoadModule $2_module modules/mod_$2.so#${rcom}LoadModule $2_module modules/mod_$2.so#" "$path" + fi +} +if [ ! -f /usr/lib/php ]; then + ln -s /usr/lib/php7 /usr/lib/php +fi +if [ ! -f /usr/lib/libxml2.so ]; then + ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so +fi +if [ ! -d /app/$WWW_DIR ]; then + mkdir -p /app/$WWW_DIR +fi +if [ ! -d /run/apache2 ]; then + mkdir /run/apache2 +fi +chown -R 1000:apache /app/$WWW_DIR +chmod -R 755 /scripts/pre-init.d +mkdir -p /run/apache2 +chown apache:apache /run/apache2 + +tmpsed='s#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g' +sed -i "$tmpsed" /etc/apache2/httpd.conf +sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf + +initTitle "Apache" "Loading Modules" +a2setModule 1 "rewrite" +a2setModule 1 "mpm_prefork" +a2setModule 1 "slotmem_shm" +a2setModule 1 "heartmonitor" +#~ a2setModule 1 "watchdog" +initTitle "Apache" "Removing Modules" +a2setModule 0 "mpm_event" +a2setModule 0 "proxy_fdpass" /etc/apache2/conf.d/proxy.conf + +sed -i "s|;*date.timezone =.*|date.timezone = ${TZ}|i" /etc/php7/php.ini +sed -ir 's/expose_php = On/expose_php = Off/' /etc/php7/php.ini +echo -e "\nIncludeOptional /app/vhost" >> /etc/apache2/httpd.conf +unset tmpsed diff --git a/pluie/alpine-apache-php7/main.sh b/pluie/alpine-apache-php7/main.sh new file mode 100755 index 0000000..b8afa9a --- /dev/null +++ b/pluie/alpine-apache-php7/main.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# @app pluie/alpine-apache +# @author a-Sansara https://git.pluie.org/pluie/docker-images + +. /scripts/common.sh + +initTitle "Starting" "Apache Daemon" +httpd -D FOREGROUND diff --git a/pluie/alpine-apache-php7/pre-init.d/10-apache.sh b/pluie/alpine-apache-php7/pre-init.d/10-apache.sh new file mode 100755 index 0000000..aa532e8 --- /dev/null +++ b/pluie/alpine-apache-php7/pre-init.d/10-apache.sh @@ -0,0 +1,11 @@ +#!/usr/bin/bash +# @app pluie/alpine-apache +# @author a-Sansara https://git.pluie.org/pluie/docker-images + +if [ ! -z "$FIX_OWNERSHIP" ] && [ "$FIX_OWNERSHIP" -eq 1 ] && [ -d /app/$WWW_DIR ]; then + chown -R 1000:apache /app/$WWW_DIR +fi + +touch /var/log/apache2/error.log + +tail -F /var/log/apache2/error.log & diff --git a/pluie/alpine-apache-php7/pre-init.d/10-vhost.sh b/pluie/alpine-apache-php7/pre-init.d/10-vhost.sh new file mode 100755 index 0000000..4c2481b --- /dev/null +++ b/pluie/alpine-apache-php7/pre-init.d/10-vhost.sh @@ -0,0 +1,24 @@ +#!/usr/bin/bash +# @app pluie/alpine-apache +# @author a-Sansara https://git.pluie.org/pluie/docker-images + +if [ ! -z "/app/vhost" ]; then + cat < "/app/vhost" + + ServerName $HTTP_SERVER_NAME + SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1 + + AllowOverride None + Require all granted + DirectoryIndex $WWW_INDEX + + Options -MultiViews +FollowSymlinks + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ $WWW_INDEX [QSA,L] + + + +# IncludeOptional /app/vhost2 +EOF +fi diff --git a/pluie/alpine-apache/Dockerfile b/pluie/alpine-apache/Dockerfile index b5c02e9..4c8e8a8 100644 --- a/pluie/alpine-apache/Dockerfile +++ b/pluie/alpine-apache/Dockerfile @@ -13,7 +13,7 @@ ENV SHENV_NAME=Apache \ WWW_DIR=www \ WWW_INDEX=index.php \ FIX_OWNERSHIP=1 \ - TZ=Europe/Paris + TZ=Europe/Paris EXPOSE 80 diff --git a/pluie/alpine-apache/README.md b/pluie/alpine-apache/README.md index ca8636b..2f58cb7 100644 --- a/pluie/alpine-apache/README.md +++ b/pluie/alpine-apache/README.md @@ -5,6 +5,7 @@ - [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 - [pluie/alpine-apache-fpm][7] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 Fpm - [pluie/alpine-symfony][6] ( ~ 82 MB ) Symfony2.8 or 3.0 + - [pluie/alpine-apache-php7][8] ( ~ 50 MB ) Apache/2.4.25 Php/7.0.15 - [pluie/alpine-mysql][4] ( ~172 MB ) Mysql/5.5.47 ( MariaDB ) - [docker tips][5] @@ -12,7 +13,7 @@ Extend pluie/alpine with __apache 2.4.23__ and __php 5.6.24__ - error log are attached to stdout - no need port redirection -- you can use env var at container creation : __HTTP_SERVER_NAME__ (default : docker-site.dev ortherwise edit app/vhost later) +- you can use env var at container creation : __HTTP_SERVER_NAME__ (default : apache.docker ortherwise edit app/vhost later) - you can still use ever your local http & sql server while your container(s) are running @@ -62,23 +63,27 @@ by default it use the apache rewrite module to redirect all uri to entry point $ chdir to your project directory ``` -$ docker run --name apache -it --link=mysql:db1 -v $(pwd):/app pluie/alpine-apache +$ docker run --name apache -it --link=mysql:db -v $(pwd):/app pluie/alpine-apache ``` or ``` -$ docker run --name apache -it --link=mysql:db1 -e HTTP_SERVER_NAME=yourServerName -v $(pwd):/app pluie/alpine-apache +$ docker run --name apache -it --link=mysql:db -e HTTP_SERVER_NAME=yourServerName -v $(pwd):/app pluie/alpine-apache ``` ## Controling http server ``` +# reload +$ docker exec -it apache "httpd -k graceful" +# restart $ docker exec -it apache "httpd -k restart" ``` for more commands : ``` $ docker exec -it apache "httpd -h" ``` + [1]: https://github.com/pluie-org/docker-images [2]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine [3]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache @@ -86,3 +91,4 @@ $ docker exec -it apache "httpd -h" [7]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-fpm [5]: https://github.com/pluie-org/docker-images/blob/master/DOCKER.md [6]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony + [8]: https://github.com/pluie-org/docker-images/tree/master/pluie/7alpine-php diff --git a/pluie/alpine-apache/files.tar b/pluie/alpine-apache/files.tar index 73ce631..1dc4c75 100644 Binary files a/pluie/alpine-apache/files.tar and b/pluie/alpine-apache/files.tar differ diff --git a/pluie/alpine-mysql/README.md b/pluie/alpine-mysql/README.md index 33e29df..bf1d5bf 100644 --- a/pluie/alpine-mysql/README.md +++ b/pluie/alpine-mysql/README.md @@ -5,6 +5,7 @@ - [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 - [pluie/alpine-apache-fpm][7] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 Fpm - [pluie/alpine-symfony][6] ( ~ 82 MB ) Symfony2.8 or 3.1 + - [pluie/alpine-apache-php7][8] ( ~ 50 MB ) Apache/2.4.25 Php/7.0.15 - [pluie/alpine-mysql][4] ( ~172 MB ) MariaDb/10.1.14 - [docker tips][5] @@ -126,7 +127,6 @@ to link this container to another, use the default docker behavior docker run --name mycontainer --link mysql:db ... ``` - [1]: https://github.com/pluie-org/docker-images [2]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine [3]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache @@ -134,3 +134,4 @@ docker run --name mycontainer --link mysql:db ... [7]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-fpm [5]: https://github.com/pluie-org/docker-images/blob/master/DOCKER.md [6]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony + [8]: https://github.com/pluie-org/docker-images/tree/master/pluie/7alpine-php diff --git a/pluie/alpine-mysql/files.tar b/pluie/alpine-mysql/files.tar index 10651be..5e12851 100644 Binary files a/pluie/alpine-mysql/files.tar and b/pluie/alpine-mysql/files.tar differ diff --git a/pluie/alpine-symfony/README.md b/pluie/alpine-symfony/README.md index ee7fccc..cecffc7 100644 --- a/pluie/alpine-symfony/README.md +++ b/pluie/alpine-symfony/README.md @@ -5,6 +5,7 @@ - [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 - [pluie/alpine-apache-fpm][7] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 Fpm - [pluie/alpine-symfony][6] ( ~ 82 MB ) Symfony2.8 or 3.1 + - [pluie/alpine-apache-php7][8] ( ~ 50 MB ) Apache/2.4.25 Php/7.0.15 - [pluie/alpine-mysql][4] ( ~172 MB ) MariaDb/10.1.14 - [docker tips][5] @@ -20,7 +21,7 @@ the symfony framework with $SYMFONY_VERSION version on the /app directory ## ENV variables ``` - SYMFONY_VERSION=3.1 # symfony version + SYMFONY_VERSION=3.1 # symfony version ``` ### Inherit ENV variables @@ -46,11 +47,11 @@ the symfony framework with $SYMFONY_VERSION version on the /app directory chdir to your project directory ``` -$ docker run --name symfony -it --link=mysql:db1 -v $(pwd):/app pluie/alpine-symfony +$ docker run --name symfony -it --link=mysql:db -v $(pwd):/app pluie/alpine-symfony ``` or ``` -$ docker run --name symfony -d --link=mysql:db1 -e HTTP_SERVER_NAME=yourServerName -v $(pwd):/app pluie/alpine-symfony +$ docker run --name symfony -d --link=mysql:db -e HTTP_SERVER_NAME=yourServerName -v $(pwd):/app pluie/alpine-symfony ``` ## Connect to container @@ -66,3 +67,4 @@ $ docker exec -it symfony bash [7]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-fpm [5]: https://github.com/pluie-org/docker-images/blob/master/DOCKER.md [6]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony + [8]: https://github.com/pluie-org/docker-images/tree/master/pluie/7alpine-php diff --git a/pluie/alpine-symfony/files.tar b/pluie/alpine-symfony/files.tar index ef70bd1..0858a05 100644 Binary files a/pluie/alpine-symfony/files.tar and b/pluie/alpine-symfony/files.tar differ diff --git a/pluie/alpine-symfony/pre-init.d/10-symfony.sh b/pluie/alpine-symfony/pre-init.d/10-symfony.sh index 0eb8b8d..66ef499 100644 --- a/pluie/alpine-symfony/pre-init.d/10-symfony.sh +++ b/pluie/alpine-symfony/pre-init.d/10-symfony.sh @@ -2,7 +2,7 @@ # @app pluie/alpine-symfony # @author a-Sansara https://git.pluie.org/pluie/docker-images - +ln -s /usr/bin/php7 /usr/bin/php if [ ! -d /app/$WWW_DIR ]; then cd /tmp mkdir $WWW_DIR diff --git a/pluie/alpine/README.md b/pluie/alpine/README.md index d9abbcb..4b4dc6f 100644 --- a/pluie/alpine/README.md +++ b/pluie/alpine/README.md @@ -5,6 +5,7 @@ - [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 - [pluie/alpine-apache-fpm][7] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 Fpm - [pluie/alpine-symfony][6] ( ~ 82 MB ) Symfony2.8 or 3.1 + - [pluie/alpine-apache-php7][8] ( ~ 50 MB ) Apache/2.4.25 Php/7.0.15 - [pluie/alpine-mysql][4] ( ~172 MB ) MariaDb/10.1.14 - [docker tips][5] @@ -105,3 +106,4 @@ RUN bash /scripts/install.sh [7]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-fpm [5]: https://github.com/pluie-org/docker-images/blob/master/DOCKER.md [6]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony + [8]: https://github.com/pluie-org/docker-images/tree/master/pluie/7alpine-php diff --git a/pluie/alpine/files.tar b/pluie/alpine/files.tar index a8a3b31..ad837ae 100644 Binary files a/pluie/alpine/files.tar and b/pluie/alpine/files.tar differ