fix php7 & add symfony-php7
This commit is contained in:
parent
88e1b70c4d
commit
02ad396a6a
|
@ -6,7 +6,8 @@
|
|||
- [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
|
||||
- [pluie/alpine-symfony-php7][9] ( ~ 82 MB ) Symfony2.8 or 3.2 Php/7.0.15
|
||||
- [pluie/alpine-mysql][4] ( ~172 MB ) Mysql/5.5.47 ( MariaDB )
|
||||
- [docker tips][5]
|
||||
|
||||
### Networking
|
||||
|
@ -163,4 +164,5 @@ 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
|
||||
[8]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-php7
|
||||
[9]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony-php7
|
||||
|
|
|
@ -10,7 +10,8 @@ various based images for Docker
|
|||
- [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
|
||||
- [pluie/alpine-symfony-php7][9] ( ~ 82 MB ) Symfony2.8 or 3.2 Php/7.0.15
|
||||
- [pluie/alpine-mysql][4] ( ~172 MB ) Mysql/5.5.47 ( MariaDB )
|
||||
- [docker tips][5]
|
||||
|
||||
## Base Image Structure
|
||||
|
@ -80,4 +81,5 @@ 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
|
||||
[8]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-php7
|
||||
[9]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony-php7
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
- [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
|
||||
- [pluie/alpine-symfony-php7][9] ( ~ 82 MB ) Symfony2.8 or 3.2 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.23__ and __php 5.6.24__ with FPM
|
||||
|
@ -95,4 +96,5 @@ $ 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
|
||||
[8]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-php7
|
||||
[9]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony-php7
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
- [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-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-symfony-php7][9] ( ~ 82 MB ) Symfony2.8 or 3.2 Php/7.0.15
|
||||
- [pluie/alpine-mysql][4] ( ~172 MB ) Mysql/5.5.47 ( MariaDB )
|
||||
- [docker tips][5]
|
||||
|
||||
|
@ -92,3 +93,4 @@ $ docker exec -it php7 "httpd -h"
|
|||
[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
|
||||
[9]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony-php7
|
||||
|
|
Binary file not shown.
|
@ -16,8 +16,8 @@ function a2setModule(){
|
|||
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
|
||||
if [ ! -f /usr/bin/php ]; then
|
||||
ln -s /usr/bin/php7 /usr/bin/php
|
||||
fi
|
||||
if [ ! -f /usr/lib/libxml2.so ]; then
|
||||
ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
- [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-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-symfony-php7][9] ( ~ 82 MB ) Symfony2.8 or 3.2 Php/7.0.15
|
||||
- [pluie/alpine-mysql][4] ( ~172 MB ) Mysql/5.5.47 ( MariaDB )
|
||||
- [docker tips][5]
|
||||
|
||||
|
@ -91,4 +92,5 @@ $ 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
|
||||
[8]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-php7
|
||||
[9]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony-php7
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
- [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
|
||||
- [pluie/alpine-symfony-php7][9] ( ~ 82 MB ) Symfony2.8 or 3.2 Php/7.0.15
|
||||
- [pluie/alpine-mysql][4] ( ~172 MB ) Mysql/5.5.47 ( MariaDB )
|
||||
- [docker tips][5]
|
||||
|
||||
Extend pluie/alpine with mysql (MariaDb/10.1.14)
|
||||
|
@ -134,4 +135,5 @@ 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
|
||||
[8]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-php7
|
||||
[9]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony-php7
|
||||
|
|
19
pluie/alpine-symfony-php7/Dockerfile
Normal file
19
pluie/alpine-symfony-php7/Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @app pluie/alpine-apache
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
FROM pluie/alpine-apache-php7
|
||||
|
||||
MAINTAINER a-Sansara https://github.com/a-sansara
|
||||
|
||||
ADD files.tar /scripts
|
||||
|
||||
ENV SHENV_NAME=Symfony \
|
||||
SHENV_COLOR=33 \
|
||||
HTTP_SERVER_NAME=symfony.docker \
|
||||
WWW_DIR=web \
|
||||
WWW_INDEX=app.php \
|
||||
SYMFONY_VERSION=3.2
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
RUN bash /scripts/install.sh
|
77
pluie/alpine-symfony-php7/README.md
Normal file
77
pluie/alpine-symfony-php7/README.md
Normal file
|
@ -0,0 +1,77 @@
|
|||
# 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.1
|
||||
- [pluie/alpine-apache-php7][8] ( ~ 50 MB ) Apache/2.4.25 Php/7.0.15
|
||||
- [pluie/alpine-symfony-php7][9] ( ~ 82 MB ) Symfony2.8 or 3.2 Php/7.0.15
|
||||
- [pluie/alpine-mysql][4] ( ~172 MB ) Mysql/5.5.47 ( MariaDB )
|
||||
- [docker tips][5]
|
||||
|
||||
Extend pluie/alpine-apache-php7.
|
||||
|
||||
if __/app/$WWW_DIR__ does not exits then __pluie/alpine-symfony-php7__ install
|
||||
the symfony framework with $SYMFONY_VERSION version on the /app directory
|
||||
|
||||
## Image Size
|
||||
|
||||
- image ~ 82 MB
|
||||
|
||||
## ENV variables
|
||||
|
||||
```
|
||||
SYMFONY_VERSION=3.2 # symfony version
|
||||
```
|
||||
|
||||
### Inherit ENV variables
|
||||
|
||||
```
|
||||
HTTP_SERVER_NAME=symfony.docker # apache ServerName
|
||||
WWW_DIR=web # DocumentRoot relative to volume
|
||||
WWW_INDEX=app.php # DirectoryIndex
|
||||
SHENV_CTX=LOCAL # LOCAL|INT|PROD change context bg color
|
||||
SHENV_NAME=symfony # container name
|
||||
SHENV_COLOR=33 # ANSI EXTENDED COLOR CODE
|
||||
FIX_OWNERSHIP=1
|
||||
TZ=Europe/Paris # TIMEZONE
|
||||
```
|
||||
|
||||
## Image Volumes
|
||||
|
||||
- __/app__ directory is a docker volume bind to your symfony project
|
||||
|
||||
__/app/$WWW_DIR__ is the documentRoot.
|
||||
|
||||
__/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
|
||||
|
||||
|
||||
## Image Usage
|
||||
|
||||
chdir to your project directory
|
||||
```
|
||||
$ docker run --name symfony -it --link=mysql:db -v $(pwd):/app pluie/alpine-symfony-php7
|
||||
```
|
||||
or
|
||||
```
|
||||
$ docker run --name symfony -d --link=mysql:db -e HTTP_SERVER_NAME=yourServerName -v $(pwd):/app pluie/alpine-symfony-php7
|
||||
```
|
||||
|
||||
## Connect to container
|
||||
|
||||
```
|
||||
$ docker exec -it symfony bash
|
||||
```
|
||||
|
||||
|
||||
[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
|
||||
[9]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony-php7
|
22
pluie/alpine-symfony-php7/build
Executable file
22
pluie/alpine-symfony-php7/build
Executable file
|
@ -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
|
BIN
pluie/alpine-symfony-php7/files.tar
Normal file
BIN
pluie/alpine-symfony-php7/files.tar
Normal file
Binary file not shown.
7
pluie/alpine-symfony-php7/install.d/10-symfony.sh
Executable file
7
pluie/alpine-symfony-php7/install.d/10-symfony.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
# @app pluie/alpine-symfony
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
apk -U add php7-iconv php7-intl php7-posix
|
||||
curl -LsS https://symfony.com/installer -o /usr/bin/symfony
|
||||
chmod +x /usr/bin/symfony
|
8
pluie/alpine-symfony-php7/main.sh
Executable file
8
pluie/alpine-symfony-php7/main.sh
Executable file
|
@ -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
|
13
pluie/alpine-symfony-php7/pre-init.d/10-symfony.sh
Executable file
13
pluie/alpine-symfony-php7/pre-init.d/10-symfony.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
# @app pluie/alpine-symfony
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
if [ ! -d /app/$WWW_DIR ]; then
|
||||
cd /tmp
|
||||
mkdir $WWW_DIR
|
||||
symfony new app $SYMFONY_VERSION
|
||||
mv app/* /app/
|
||||
chown -R 1000:apache /app/
|
||||
chown -R 1000:apache /app/var
|
||||
chmod -R g+w /app
|
||||
fi
|
|
@ -12,7 +12,7 @@ ENV SHENV_NAME=Symfony \
|
|||
HTTP_SERVER_NAME=symfony.docker \
|
||||
WWW_DIR=web \
|
||||
WWW_INDEX=app.php \
|
||||
SYMFONY_VERSION=3.1
|
||||
SYMFONY_VERSION=3.2
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
- [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
|
||||
- [pluie/alpine-symfony-php7][9] ( ~ 82 MB ) Symfony2.8 or 3.2 Php/7.0.15
|
||||
- [pluie/alpine-mysql][4] ( ~172 MB ) Mysql/5.5.47 ( MariaDB )
|
||||
- [docker tips][5]
|
||||
|
||||
Extend pluie/alpine-apache-fpm.
|
||||
|
@ -67,4 +68,5 @@ $ 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
|
||||
[8]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-php7
|
||||
[9]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony-php7
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
# @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
|
||||
ls -la /tmp
|
||||
mkdir $WWW_DIR
|
||||
symfony new app $SYMFONY_VERSION
|
||||
mv app/* /app/
|
||||
chown -R 1000:apache /app/
|
||||
chown -R 1000:nogroup /app/var
|
||||
chmod -R g+w /app
|
||||
mkdir -p /app/var/logs
|
||||
chown -R 1000:apache /app/var
|
||||
chmod -R g+w /app/
|
||||
fi
|
||||
|
|
|
@ -4,9 +4,10 @@
|
|||
- [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.1
|
||||
- [pluie/alpine-symfony][6] ( ~ 82 MB ) Symfony2.8 or 3.2
|
||||
- [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
|
||||
- [pluie/alpine-symfony-php7][9] ( ~ 82 MB ) Symfony2.8 or 3.2 Php/7.0.15
|
||||
- [pluie/alpine-mysql][4] ( ~172 MB ) Mysql/5.5.47 ( MariaDB )
|
||||
- [docker tips][5]
|
||||
|
||||
This Image provide a Linux Alpine distribution with :
|
||||
|
@ -106,4 +107,5 @@ 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
|
||||
[8]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-apache-php7
|
||||
[9]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony-php7
|
||||
|
|
Loading…
Reference in New Issue
Block a user