Compare commits
35 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
09b2d8f1a0 | ||
|
e946a39e7c | ||
|
2e5e401c85 | ||
|
b525151f68 | ||
|
db06c5d107 | ||
|
ffe9dc8cb0 | ||
|
43ca75bef6 | ||
|
32093e01d6 | ||
|
232ea7a8da | ||
|
28533f0cce | ||
|
9cabf4d736 | ||
|
3951d9deb1 | ||
|
17163c9b3d | ||
|
9852484282 | ||
|
02ad396a6a | ||
|
88e1b70c4d | ||
|
125eb03dee | ||
|
7ddff5a239 | ||
|
b92bff465d | ||
|
0dd7c33a71 | ||
|
7585f595c3 | ||
|
48d9fc2840 | ||
|
79cb538ef5 | ||
|
6f22d95e79 | ||
|
28334d5314 | ||
|
4824f4aedf | ||
|
7dfd83b51c | ||
|
05585bc223 | ||
|
e185c732dc | ||
|
fc8be7c6f4 | ||
|
8efe12893d | ||
|
f4f492ae66 | ||
|
300de09c5a | ||
|
775cfba38c | ||
|
1c7306527f |
198
DOCKER.md
Normal file
198
DOCKER.md
Normal file
|
@ -0,0 +1,198 @@
|
||||||
|
## Docker
|
||||||
|
|
||||||
|
- [index][1]
|
||||||
|
- [pluie/alpine][2] ( ~ 9 MB ) Alpine/3.5
|
||||||
|
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.25 Php/5.6.30
|
||||||
|
- [pluie/alpine-apache-fpm][7] ( ~ 51 MB ) Apache/2.4.25 Php/5.6.30 Fpm
|
||||||
|
- [pluie/alpine-symfony][6] ( ~ 83 MB ) Symfony2.8 or 3.2
|
||||||
|
- [pluie/alpine-apache-php7][8] ( ~ 45 MB ) Apache/2.4.25 Php/7.0.16
|
||||||
|
- [pluie/alpine-symfony-php7][9] ( ~ 77 MB ) Symfony2.8 or 3.2 Php/7.0.16
|
||||||
|
- [pluie/alpine-mysql][4] ( ~181 MB ) Mysql/5.6 ( MariaDB )
|
||||||
|
- [pluie/libecho][10] ( ~288 MB ) Vala 0.34.2 pluie-echo-0.2
|
||||||
|
- [pluie/ubuntu][12] ( ~141 MB ) Ubuntu 18.04
|
||||||
|
- [pluie/libyaml][11] ( ~538 MB ) Vala 0.40.4 pluie-yaml-0.4
|
||||||
|
- [docker tips][5]
|
||||||
|
|
||||||
|
### Networking
|
||||||
|
|
||||||
|
#### create network
|
||||||
|
```
|
||||||
|
docker network create \
|
||||||
|
--subnet=172.22.0.0/16 \
|
||||||
|
--gateway=172.22.0.1 \
|
||||||
|
-o "com.docker.network.bridge.name"="home0" \
|
||||||
|
home0
|
||||||
|
```
|
||||||
|
|
||||||
|
#### inspect ip
|
||||||
|
```
|
||||||
|
docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container
|
||||||
|
```
|
||||||
|
|
||||||
|
#### /etc/hosts
|
||||||
|
```
|
||||||
|
# > DOCKER - bridge home0
|
||||||
|
172.22.0.2 db.docker
|
||||||
|
172.22.0.3 gogs.docker
|
||||||
|
172.22.0.4 pma.docker
|
||||||
|
172.22.0.5 bo-payment.docker
|
||||||
|
172.22.0.6 wordpress.docker
|
||||||
|
172.22.0.7 fpm.docker
|
||||||
|
172.22.0.8 symfony.docker
|
||||||
|
172.22.0.9 php7.docker
|
||||||
|
# <
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Util
|
||||||
|
|
||||||
|
#### remove all container
|
||||||
|
```
|
||||||
|
docker rm $(docker ps -a -q)
|
||||||
|
```
|
||||||
|
rm -v to also remove volume
|
||||||
|
rm -f to force stop running container before removing
|
||||||
|
|
||||||
|
|
||||||
|
#### remove none images
|
||||||
|
```
|
||||||
|
docker rmi $(docker images | grep "^<none>" | awk "{print \$3}")
|
||||||
|
```
|
||||||
|
|
||||||
|
#### remove all volumes
|
||||||
|
```
|
||||||
|
docker volume rm $(docker volume ls -qf dangling=true)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### logs container
|
||||||
|
```
|
||||||
|
docker logs -f container
|
||||||
|
```
|
||||||
|
|
||||||
|
#### stats container
|
||||||
|
```
|
||||||
|
docker stats container
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pluie container
|
||||||
|
|
||||||
|
#### map
|
||||||
|
|
||||||
|
[db.docker](http://db.docker)
|
||||||
|
[pma.docker](http://pma.docker)
|
||||||
|
[gogs.docker](http://gogs.docker)
|
||||||
|
[bo-payment.docker](http://bo-payment.docker)
|
||||||
|
[wordpress.docker](http://wordpress.docker)
|
||||||
|
[fpm.docker](http://symfony.docker)
|
||||||
|
[symfony.docker](http://symfony.docker)
|
||||||
|
|
||||||
|
#### Mysql
|
||||||
|
```
|
||||||
|
cd /home/dev/docker
|
||||||
|
|
||||||
|
docker run --name mysql --restart=always \
|
||||||
|
--net home0 -h db.docker --ip 172.22.0.2 \
|
||||||
|
-v $(pwd)/db/mysql:/var/lib/mysql \
|
||||||
|
-v $(pwd)/db/dump:/dump \
|
||||||
|
-e MYSQL_DATABASE=bo-payment \
|
||||||
|
-e MYSQL_USER=dev \
|
||||||
|
-e MYSQL_PASSWORD=mysql \
|
||||||
|
-d pluie/alpine-mysql
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Gogs
|
||||||
|
```
|
||||||
|
cd /home/dev/docker
|
||||||
|
|
||||||
|
docker run --name gogs --restart=always \
|
||||||
|
--net home0 -h gogs.docker --ip 172.22.0.3 --link mysql:db \
|
||||||
|
-v $(pwd)/gogs:/data \
|
||||||
|
gogs/gogs
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Phpmyadmin
|
||||||
|
```
|
||||||
|
docker run --name pma --restart=always \
|
||||||
|
--net home0 -h pma.docker --ip 172.22.0.4 --link mysql:db \
|
||||||
|
-d phpmyadmin/phpmyadmin
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Apache
|
||||||
|
```
|
||||||
|
cd /home/dev/docker
|
||||||
|
|
||||||
|
docker run --name apache --restart=always \
|
||||||
|
--net home0 -h bo-payment.docker --ip 172.22.0.5 --link mysql:db \
|
||||||
|
-v $(pwd)/repo/bo-payment:/app \
|
||||||
|
-e HTTP_SERVER_NAME=bo-payment.docker \
|
||||||
|
-d pluie/alpine-apache
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Apache Php7
|
||||||
|
```
|
||||||
|
cd /home/dev/docker
|
||||||
|
|
||||||
|
docker run --name php7 --restart=always \
|
||||||
|
--net home0 -h bo-payment.docker --ip 172.22.0.9 --link mysql:db \
|
||||||
|
-v $(pwd)/repo/pws-server:/app \
|
||||||
|
-e HTTP_SERVER_NAME=bo-payment.docker \
|
||||||
|
-e WWW_DIR=web \
|
||||||
|
-d pluie/alpine-apache-php7
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Wordpress
|
||||||
|
```
|
||||||
|
cd /home/dev/docker
|
||||||
|
|
||||||
|
docker run --name wordpress --restart=always \
|
||||||
|
--net home0 -h wordpress.docker --ip 172.22.0.6 --link mysql:db \
|
||||||
|
-v $(pwd)/repo/blog:/app \
|
||||||
|
-e HTTP_SERVER_NAME=wordpress.docker \
|
||||||
|
-d pluie/alpine-apache
|
||||||
|
```
|
||||||
|
|
||||||
|
#### ApacheFpm
|
||||||
|
```
|
||||||
|
cd /home/dev/docker
|
||||||
|
|
||||||
|
docker run --name afpm --restart=always \
|
||||||
|
--net home0 -h fpm.docker --ip 172.22.0.7 --link mysql:db \
|
||||||
|
-v $(pwd)/repo/afpm:/app \
|
||||||
|
-e HTTP_SERVER_NAME=afpm.docker \
|
||||||
|
-d pluie/alpine-apache-fpm
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symfony
|
||||||
|
```
|
||||||
|
cd /home/dev/docker
|
||||||
|
docker run --name symfony --restart=always \
|
||||||
|
--net home0 -h symfony.docker --ip 172.22.0.8 --link=mysql:db \
|
||||||
|
-e HTTP_SERVER_NAME=symfony \
|
||||||
|
-e SYMFONY_VERSION=2.8 \
|
||||||
|
-v $(pwd)/repo/myapp:/app \
|
||||||
|
-d pluie/alpine-symfony
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symfony Php7
|
||||||
|
```
|
||||||
|
cd /home/dev/docker
|
||||||
|
docker run --name symfony --restart=always \
|
||||||
|
--net home0 -h symfony.docker --ip 172.22.0.8 --link=mysql:db \
|
||||||
|
-e HTTP_SERVER_NAME=symfony \
|
||||||
|
-e SYMFONY_VERSION=3.2 \
|
||||||
|
-v $(pwd)/repo/myapp:/app \
|
||||||
|
-d pluie/alpine-symfony-php7
|
||||||
|
```
|
||||||
|
|
||||||
|
[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
|
||||||
|
[10]: https://github.com/pluie-org/docker-images/tree/master/pluie/libecho
|
||||||
|
[11]: https://github.com/pluie-org/docker-images/tree/master/pluie/libyaml
|
||||||
|
[12]: https://github.com/pluie-org/docker-images/tree/master/pluie/ubuntu
|
32
README.md
32
README.md
|
@ -1,12 +1,21 @@
|
||||||
# docker-images
|
# docker-images
|
||||||
based images for Docker
|
|
||||||
|
|
||||||
|
various based images for Docker
|
||||||
|
|
||||||
## Available Images
|
## Available Images
|
||||||
|
|
||||||
- __pluie/alpine__ ( < 10 MB) Alpine/3.2
|
- [index][1]
|
||||||
- __pluie/alpine-apache__ ( ~ 37 MB) Apache/2.4.16 Php/5.6.21
|
- [pluie/alpine][2] ( ~ 9 MB ) Alpine/3.5
|
||||||
- __pluie/alpine-mysql__ ( ~ 160 MB) Mysql/5.5.47 [MariaDB]
|
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.25 Php/5.6.30
|
||||||
|
- [pluie/alpine-apache-fpm][7] ( ~ 51 MB ) Apache/2.4.25 Php/5.6.30 Fpm
|
||||||
|
- [pluie/alpine-symfony][6] ( ~ 83 MB ) Symfony2.8 or 3.2
|
||||||
|
- [pluie/alpine-apache-php7][8] ( ~ 45 MB ) Apache/2.4.25 Php/7.0.16
|
||||||
|
- [pluie/alpine-symfony-php7][9] ( ~ 77 MB ) Symfony2.8 or 3.2 Php/7.0.16
|
||||||
|
- [pluie/alpine-mysql][4] ( ~181 MB ) Mysql/5.6 ( MariaDB )
|
||||||
|
- [pluie/libecho][10] ( ~288 MB ) Vala 0.34.2 pluie-echo-0.2
|
||||||
|
- [pluie/ubuntu][12] ( ~141 MB ) Ubuntu 18.04
|
||||||
|
- [pluie/libyaml][11] ( ~538 MB ) Vala 0.40.4 pluie-yaml-0.4
|
||||||
|
- [docker tips][5]
|
||||||
|
|
||||||
## Base Image Structure
|
## Base Image Structure
|
||||||
|
|
||||||
|
@ -21,7 +30,7 @@ project/
|
||||||
|
|
|
|
||||||
|-- pre-init.d/ # deployed in /scripts on target container
|
|-- pre-init.d/ # deployed in /scripts on target container
|
||||||
| | # launch on docker container running process
|
| | # launch on docker container running process
|
||||||
| |-- 50-example.sh
|
| |-- 50-builder.sh
|
||||||
|
|
|
|
||||||
|-- build # build docker image : ./build [TAG]
|
|-- build # build docker image : ./build [TAG]
|
||||||
|-- common.sh # don't modify - sourced by main.sh to execute pre-init.d scripts first
|
|-- common.sh # don't modify - sourced by main.sh to execute pre-init.d scripts first
|
||||||
|
@ -67,3 +76,16 @@ __build__ script archive project files in __files.tar__ then execute the __Docke
|
||||||
|
|
||||||
no need to worry about pwd, docker repository and image name depends on directory structure.
|
no need to worry about pwd, docker repository and image name depends on directory structure.
|
||||||
you can keep same __build__ script in any project
|
you can keep same __build__ script in any project
|
||||||
|
|
||||||
|
[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
|
||||||
|
[10]: https://github.com/pluie-org/docker-images/tree/master/pluie/libecho
|
||||||
|
[11]: https://github.com/pluie-org/docker-images/tree/master/pluie/libyaml
|
||||||
|
[12]: https://github.com/pluie-org/docker-images/tree/master/pluie/ubuntu
|
||||||
|
|
1
pluie/alpine-apache-fpm/.gitignore
vendored
Normal file
1
pluie/alpine-apache-fpm/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
files.tar
|
22
pluie/alpine-apache-fpm/Dockerfile
Normal file
22
pluie/alpine-apache-fpm/Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# @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=ApacheFpm \
|
||||||
|
SHENV_COLOR=67 \
|
||||||
|
HTTP_SERVER_NAME=fpm.docker \
|
||||||
|
WWW_DIR=www \
|
||||||
|
WWW_INDEX=index.php \
|
||||||
|
FIX_OWNERSHIP=1 \
|
||||||
|
TZ=Europe/Paris
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
VOLUME /etc/php5/fpm.d/
|
||||||
|
|
||||||
|
RUN bash /scripts/install.sh
|
106
pluie/alpine-apache-fpm/README.md
Normal file
106
pluie/alpine-apache-fpm/README.md
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
# pluie/alpine-apache
|
||||||
|
|
||||||
|
- [index][1]
|
||||||
|
- [pluie/alpine][2] ( ~ 9 MB ) Alpine/3.5
|
||||||
|
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.25 Php/5.6.30
|
||||||
|
- [pluie/alpine-apache-fpm][7] ( ~ 51 MB ) Apache/2.4.25 Php/5.6.30 Fpm
|
||||||
|
- [pluie/alpine-symfony][6] ( ~ 83 MB ) Symfony2.8 or 3.2
|
||||||
|
- [pluie/alpine-apache-php7][8] ( ~ 45 MB ) Apache/2.4.25 Php/7.0.16
|
||||||
|
- [pluie/alpine-symfony-php7][9] ( ~ 77 MB ) Symfony2.8 or 3.2 Php/7.0.16
|
||||||
|
- [pluie/alpine-mysql][4] ( ~181 MB ) Mysql/5.6 ( MariaDB )
|
||||||
|
- [pluie/libecho][10] ( ~288 MB ) Vala 0.34.2 pluie-echo-0.2
|
||||||
|
- [pluie/ubuntu][12] ( ~141 MB ) Ubuntu 18.04
|
||||||
|
- [pluie/libyaml][11] ( ~538 MB ) Vala 0.40.4 pluie-yaml-0.4
|
||||||
|
- [docker tips][5]
|
||||||
|
|
||||||
|
Extend pluie/alpine with __apache 2.4.25__ and __php 5.6.30__ with FPM
|
||||||
|
|
||||||
|
- you can use env var at container creation : __HTTP_SERVER_NAME__ (default : fpm.docker ortherwise edit app/vhost later)
|
||||||
|
|
||||||
|
|
||||||
|
## Image Size
|
||||||
|
|
||||||
|
- image ~ 51 MB
|
||||||
|
|
||||||
|
## ENV variables
|
||||||
|
|
||||||
|
```
|
||||||
|
HTTP_SERVER_NAME=fpm.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=ApacheFpm # container name
|
||||||
|
SHENV_COLOR=67 # ANSI EXTENDED COLOR CODE
|
||||||
|
TZ=Europe/Paris # TIMEZONE
|
||||||
|
```
|
||||||
|
|
||||||
|
## Image Volumes
|
||||||
|
|
||||||
|
pluie/alpine-apache-fpm has to volumes :
|
||||||
|
|
||||||
|
- __/app__ to bind to your app project (silex/symfony etc)
|
||||||
|
- __/etc/php5/fpm.d/__ to customize fpm
|
||||||
|
|
||||||
|
### note
|
||||||
|
|
||||||
|
__/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 afpm -it --link=mysql:db -v $(pwd):/app pluie/alpine-apache-fpm
|
||||||
|
```
|
||||||
|
or
|
||||||
|
```
|
||||||
|
$ 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 :
|
||||||
|
```
|
||||||
|
$ docker exec -it afpm "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
|
||||||
|
[9]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony-php7
|
||||||
|
[10]: https://github.com/pluie-org/docker-images/tree/master/pluie/libecho
|
||||||
|
[11]: https://github.com/pluie-org/docker-images/tree/master/pluie/libyaml
|
||||||
|
[12]: https://github.com/pluie-org/docker-images/tree/master/pluie/ubuntu
|
22
pluie/alpine-apache-fpm/build
Executable file
22
pluie/alpine-apache-fpm/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-apache-fpm/files.tar
Normal file
BIN
pluie/alpine-apache-fpm/files.tar
Normal file
Binary file not shown.
8
pluie/alpine-apache-fpm/install.d/10-apache.sh
Executable file
8
pluie/alpine-apache-fpm/install.d/10-apache.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
apk add apache2 apache2-proxy apache2-proxy-html apache-mod-fcgid libxml2 \
|
||||||
|
php5-fpm php5-cli php5-phar php5-zlib php5-zip php5-ctype php5-xml php5-pdo_mysql php5-mysqli \
|
||||||
|
php5-opcache php5-pdo php5-json php5-curl php5-gd php5-mcrypt php5-openssl php5-dom \
|
||||||
|
# php-pdo_odbc php-soap php-pgsql
|
50
pluie/alpine-apache-fpm/install.d/50-fix-apache.sh
Executable file
50
pluie/alpine-apache-fpm/install.d/50-fix-apache.sh
Executable file
|
@ -0,0 +1,50 @@
|
||||||
|
#!/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/libxml2.so ]; then
|
||||||
|
ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so
|
||||||
|
fi
|
||||||
|
if [ ! -d /run/apache2 ]; then
|
||||||
|
mkdir /run/apache2
|
||||||
|
fi
|
||||||
|
chmod -R 755 /scripts/pre-init.d
|
||||||
|
mkdir -p /run/apache2
|
||||||
|
chown apache:apache /run/apache2
|
||||||
|
initTitle "Apache" "Loading Modules"
|
||||||
|
a2setModule 1 "rewrite"
|
||||||
|
a2setModule 1 "mpm_event"
|
||||||
|
a2setModule 1 "slotmem_shm"
|
||||||
|
a2setModule 1 "heartmonitor"
|
||||||
|
a2setModule 1 "watchdog"
|
||||||
|
initTitle "Apache" "Removing Modules"
|
||||||
|
a2setModule 0 "mpm_prefork"
|
||||||
|
a2setModule 0 "proxy_fdpass" /etc/apache2/conf.d/proxy.conf
|
||||||
|
echo
|
||||||
|
tmpsed="/etc/php5/php.ini"
|
||||||
|
sed -ir 's/expose_php = On/expose_php = Off/' $tmpsed
|
||||||
|
sed -i "s|;*date.timezone =.*|date.timezone = ${TZ}|i" $tmpsed
|
||||||
|
cat $tmpsed | grep "date.timezone"
|
||||||
|
sed -i "s|;*cgi.fix_pathinfo=.*|cgi.fix_pathinfo= 0|i" $tmpsed
|
||||||
|
tmpsed="/etc/php5/php-fpm.conf"
|
||||||
|
sed -i "s|;*daemonize\s*=\s*yes|daemonize = no|g" $tmpsed
|
||||||
|
sed -i "s|;*listen\s*=\s*127.0.0.1:9000|listen = 9000|g" $tmpsed
|
||||||
|
sed -i "s|;*listen\s*=\s*/||g" $tmpsed
|
||||||
|
sed -i "s|pm = dynamic|pm = ondemand|g" $tmpsed
|
||||||
|
echo -e "\nIncludeOptional /app/vhost" >> /etc/apache2/httpd.conf
|
||||||
|
unset tmpsed
|
12
pluie/alpine-apache-fpm/main.sh
Executable file
12
pluie/alpine-apache-fpm/main.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
. /scripts/common.sh
|
||||||
|
|
||||||
|
sleep 3 && \
|
||||||
|
initTitle "Starting" "Apache Daemon" && \
|
||||||
|
httpd
|
||||||
|
initTitle "Starting" "PHP-FPM"
|
||||||
|
/usr/bin/php-fpm &
|
||||||
|
tail -F /var/log/apache2/error.log
|
19
pluie/alpine-apache-fpm/pre-init.d/10-apache.sh
Executable file
19
pluie/alpine-apache-fpm/pre-init.d/10-apache.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
if [ ! -d /app/$WWW_DIR ]; then
|
||||||
|
CREATE_WWW_DIR=1
|
||||||
|
mkdir -p /app/$WWW_DIR
|
||||||
|
fi
|
||||||
|
if [ ! -f /app/$WWW_DIR/$WWW_INDEX ]; then
|
||||||
|
echo "<?php phpinfo();" > /app/$WWW_DIR/$WWW_INDEX
|
||||||
|
fi
|
||||||
|
tmpsed=/etc/apache2/httpd.conf
|
||||||
|
sed -i 's#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g' $tmpsed
|
||||||
|
sed -i 's#AllowOverride none#AllowOverride All#' $tmpsed
|
||||||
|
|
||||||
|
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
|
27
pluie/alpine-apache-fpm/pre-init.d/10-vhost.sh
Executable file
27
pluie/alpine-apache-fpm/pre-init.d/10-vhost.sh
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
if [ ! -z "/app/vhost" ]; then
|
||||||
|
cat <<EOF > "/app/vhost"
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName $HTTP_SERVER_NAME
|
||||||
|
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=\$1
|
||||||
|
<FilesMatch \.php$>
|
||||||
|
SetHandler proxy:fcgi://127.0.0.1:9000
|
||||||
|
</FilesMatch>
|
||||||
|
<Directory /app/$WWW_DIR>
|
||||||
|
AllowOverride None
|
||||||
|
Require all granted
|
||||||
|
DirectoryIndex $WWW_INDEX
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
Options -MultiViews +FollowSymlinks
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ $WWW_INDEX [QSA,L]
|
||||||
|
</IfModule>
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
# IncludeOptional /app/vhost2
|
||||||
|
EOF
|
||||||
|
fi
|
4
pluie/alpine-apache-fpm/pre-init.d/30-tz.sh
Normal file
4
pluie/alpine-apache-fpm/pre-init.d/30-tz.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
tmpsed="/etc/php5/php.ini"
|
||||||
|
sed -i "s|;*date.timezone =.*|date.timezone = ${TZ}|i" $tmpsed
|
||||||
|
cat $tmpsed | grep "date.timezone"
|
20
pluie/alpine-apache-php7/Dockerfile
Normal file
20
pluie/alpine-apache-php7/Dockerfile
Normal file
|
@ -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=php7.docker \
|
||||||
|
WWW_DIR=www \
|
||||||
|
WWW_INDEX=index.php \
|
||||||
|
FIX_OWNERSHIP=1 \
|
||||||
|
TZ=Europe/Paris
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
RUN bash /scripts/install.sh
|
102
pluie/alpine-apache-php7/README.md
Normal file
102
pluie/alpine-apache-php7/README.md
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
# pluie/alpine-apache-php7
|
||||||
|
|
||||||
|
- [index][1]
|
||||||
|
- [pluie/alpine][2] ( ~ 9 MB ) Alpine/3.5
|
||||||
|
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.25 Php/5.6.30
|
||||||
|
- [pluie/alpine-apache-fpm][7] ( ~ 51 MB ) Apache/2.4.25 Php/5.6.30 Fpm
|
||||||
|
- [pluie/alpine-symfony][6] ( ~ 83 MB ) Symfony2.8 or 3.2
|
||||||
|
- [pluie/alpine-apache-php7][8] ( ~ 45 MB ) Apache/2.4.25 Php/7.0.16
|
||||||
|
- [pluie/alpine-symfony-php7][9] ( ~ 77 MB ) Symfony2.8 or 3.2 Php/7.0.16
|
||||||
|
- [pluie/alpine-mysql][4] ( ~181 MB ) Mysql/5.6 ( MariaDB )
|
||||||
|
- [pluie/libecho][10] ( ~288 MB ) Vala 0.34.2 pluie-echo-0.2
|
||||||
|
- [pluie/ubuntu][12] ( ~141 MB ) Ubuntu 18.04
|
||||||
|
- [pluie/libyaml][11] ( ~538 MB ) Vala 0.40.4 pluie-yaml-0.4
|
||||||
|
- [docker tips][5]
|
||||||
|
|
||||||
|
Extend pluie/alpine with __apache 2.4.25__ and __php 7.0.16__
|
||||||
|
|
||||||
|
- 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 ~ 45 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
|
||||||
|
[9]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony-php7
|
||||||
|
[10]: https://github.com/pluie-org/docker-images/tree/master/pluie/libecho
|
||||||
|
[11]: https://github.com/pluie-org/docker-images/tree/master/pluie/libyaml
|
||||||
|
[12]: https://github.com/pluie-org/docker-images/tree/master/pluie/ubuntu
|
22
pluie/alpine-apache-php7/build
Executable file
22
pluie/alpine-apache-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-apache-php7/files.tar
Normal file
BIN
pluie/alpine-apache-php7/files.tar
Normal file
Binary file not shown.
15
pluie/alpine-apache-php7/install.d/00-repo.sh
Normal file
15
pluie/alpine-apache-php7/install.d/00-repo.sh
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/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
|
||||||
|
#~ echo "http://alpine.gliderlabs.com/alpine/edge/community
|
||||||
|
#~ http://alpine.gliderlabs.com/alpine/edge/main
|
||||||
|
#~ http://alpine.gliderlabs.com/alpine/edge/testing
|
||||||
|
#~ " >> /etc/apk/repositories
|
||||||
|
#~ echo "http://dl-5.alpinelinux.org/alpine/edge/community
|
||||||
|
#~ http://dl-5.alpinelinux.org/alpine/edge/main
|
||||||
|
#~ http://dl-5.alpinelinux.org/alpine/edge/testing
|
||||||
|
#~ " > /etc/apk/repositories
|
9
pluie/alpine-apache-php7/install.d/10-apache.sh
Executable file
9
pluie/alpine-apache-php7/install.d/10-apache.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
apk 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
|
46
pluie/alpine-apache-php7/install.d/50-fix-apache.sh
Executable file
46
pluie/alpine-apache-php7/install.d/50-fix-apache.sh
Executable file
|
@ -0,0 +1,46 @@
|
||||||
|
#!/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/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
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d /run/apache2 ]; then
|
||||||
|
mkdir /run/apache2
|
||||||
|
fi
|
||||||
|
chmod -R 755 /scripts/pre-init.d
|
||||||
|
mkdir -p /run/apache2
|
||||||
|
chown apache:apache /run/apache2
|
||||||
|
|
||||||
|
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
|
8
pluie/alpine-apache-php7/main.sh
Executable file
8
pluie/alpine-apache-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
|
23
pluie/alpine-apache-php7/pre-init.d/10-apache.sh
Executable file
23
pluie/alpine-apache-php7/pre-init.d/10-apache.sh
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
if [ ! -d /app/$WWW_DIR ]; then
|
||||||
|
echo create dir mode
|
||||||
|
CREATE_WWW_DIR=1
|
||||||
|
mkdir -p /app/$WWW_DIR
|
||||||
|
fi
|
||||||
|
if [ ! -f /app/$WWW_DIR/$WWW_INDEX ]; then
|
||||||
|
echo "<?php phpinfo();" > /app/$WWW_DIR/$WWW_INDEX
|
||||||
|
fi
|
||||||
|
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
|
||||||
|
|
||||||
|
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 &
|
24
pluie/alpine-apache-php7/pre-init.d/10-vhost.sh
Executable file
24
pluie/alpine-apache-php7/pre-init.d/10-vhost.sh
Executable file
|
@ -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 <<EOF > "/app/vhost"
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName $HTTP_SERVER_NAME
|
||||||
|
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=\$1
|
||||||
|
<Directory /app/$WWW_DIR>
|
||||||
|
AllowOverride None
|
||||||
|
Require all granted
|
||||||
|
DirectoryIndex $WWW_INDEX
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
Options -MultiViews +FollowSymlinks
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ $WWW_INDEX [QSA,L]
|
||||||
|
</IfModule>
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
# IncludeOptional /app/vhost2
|
||||||
|
EOF
|
||||||
|
fi
|
4
pluie/alpine-apache-php7/pre-init.d/30-tz.sh
Normal file
4
pluie/alpine-apache-php7/pre-init.d/30-tz.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
tmpsed="/etc/php7/php.ini"
|
||||||
|
sed -i "s|;*date.timezone =.*|date.timezone = ${TZ}|i" $tmpsed
|
||||||
|
cat $tmpsed | grep "date.timezone"
|
|
@ -1,13 +1,20 @@
|
||||||
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
FROM pluie/alpine
|
FROM pluie/alpine
|
||||||
|
|
||||||
MAINTAINER a-Sansara https://github.com/a-sansara
|
MAINTAINER a-Sansara https://github.com/a-sansara
|
||||||
|
|
||||||
ADD files.tar /scripts
|
ADD files.tar /scripts
|
||||||
|
|
||||||
RUN bash /scripts/install.sh
|
ENV SHENV_NAME=Apache \
|
||||||
|
SHENV_COLOR=67 \
|
||||||
ENV SHENV_NAME=Apache SHENV_COLOR=67 HTTP_SERVER_NAME=docker-site.dev FIX_OWNERSHIP=1
|
HTTP_SERVER_NAME=site.docker \
|
||||||
|
WWW_DIR=www \
|
||||||
|
WWW_INDEX=index.php \
|
||||||
|
FIX_OWNERSHIP=1 \
|
||||||
|
TZ=Europe/Paris
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
VOLUME /app
|
RUN bash /scripts/install.sh
|
||||||
|
|
|
@ -1,33 +1,63 @@
|
||||||
# pluie/alpine-apache
|
# pluie/alpine-apache
|
||||||
|
|
||||||
Extend pluie/alpine with apache 2.4.16
|
- [index][1]
|
||||||
|
- [pluie/alpine][2] ( ~ 9 MB ) Alpine/3.5
|
||||||
|
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.25 Php/5.6.30
|
||||||
|
- [pluie/alpine-apache-fpm][7] ( ~ 51 MB ) Apache/2.4.25 Php/5.6.30 Fpm
|
||||||
|
- [pluie/alpine-symfony][6] ( ~ 83 MB ) Symfony2.8 or 3.2
|
||||||
|
- [pluie/alpine-apache-php7][8] ( ~ 45 MB ) Apache/2.4.25 Php/7.0.16
|
||||||
|
- [pluie/alpine-symfony-php7][9] ( ~ 77 MB ) Symfony2.8 or 3.2 Php/7.0.16
|
||||||
|
- [pluie/alpine-mysql][4] ( ~181 MB ) Mysql/5.6 ( MariaDB )
|
||||||
|
- [pluie/libecho][10] ( ~288 MB ) Vala 0.34.2 pluie-echo-0.2
|
||||||
|
- [pluie/ubuntu][12] ( ~141 MB ) Ubuntu 18.04
|
||||||
|
- [pluie/libyaml][11] ( ~538 MB ) Vala 0.40.4 pluie-yaml-0.4
|
||||||
|
- [docker tips][5]
|
||||||
|
|
||||||
|
Extend pluie/alpine with __apache 2.4.25__ and __php 5.6.30__
|
||||||
|
|
||||||
- error log are attached to stdout
|
- error log are attached to stdout
|
||||||
- no need port redirection
|
- 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
|
- you can still use ever your local http & sql server while your container(s) are running
|
||||||
|
|
||||||
|
|
||||||
## Image Size
|
## Image Size
|
||||||
|
|
||||||
- image ~ 37 MB
|
- image ~ 50 MB
|
||||||
|
|
||||||
|
## ENV variables
|
||||||
|
|
||||||
|
```
|
||||||
|
HTTP_SERVER_NAME=apache.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=Apache # container name
|
||||||
|
SHENV_COLOR=67 # ANSI EXTENDED COLOR CODE
|
||||||
|
TZ=Europe/Paris # TIMEZONE
|
||||||
|
```
|
||||||
|
|
||||||
## Image Volumes
|
## Image Volumes
|
||||||
|
|
||||||
__/app__ directory is a docker volume bind to your app project (silex/symfony etc)
|
__/app__ directory is a docker volume bind to your app project (silex/symfony etc)
|
||||||
|
|
||||||
__/app/www/__ is the documentRoot.
|
__/app/$WWW_DIR__ is the documentRoot.
|
||||||
put only your entry point and static files to the documentRoot directory, no your app sources
|
put only your entry point and static files to the documentRoot directory, no your app sources
|
||||||
(__/app__ directory is design for this).
|
(__/app__ directory is design for this).
|
||||||
|
|
||||||
__/app/vhost__ is your app vhost configuration file (with a serverName directive).
|
__/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 the unique entry point index.php
|
by default it use the apache rewrite module to redirect all uri to entry point $WWW_INDEX
|
||||||
|
|
||||||
```
|
```
|
||||||
/app/ # your application directory
|
/app/ # your application directory
|
||||||
|
|
|
|
||||||
|---- www/ # documentRoot
|
|---- $WWW_DIR/ # documentRoot
|
||||||
|
|
|
|
||||||
|---- vhost # apache app vhost
|
|---- vhost # apache app vhost
|
||||||
```
|
```
|
||||||
|
@ -37,20 +67,36 @@ by default it use the apache rewrite module to redirect all uri to the unique en
|
||||||
|
|
||||||
chdir to your project directory
|
chdir to your project directory
|
||||||
```
|
```
|
||||||
$ docker run --name apache -it --link=db1:mysql -v $(pwd):/app pluie/apache
|
$ docker run --name apache -it --link=mysql:db -v $(pwd):/app pluie/alpine-apache
|
||||||
```
|
```
|
||||||
or
|
or
|
||||||
```
|
```
|
||||||
$ docker run --name srv -it --link=db1:mysql -e HTTP_SERVER_NAME=yourServerName -v $(pwd):/app pluie/apache
|
$ docker run --name apache -it --link=mysql:db -e HTTP_SERVER_NAME=yourServerName -v $(pwd):/app pluie/alpine-apache
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Controling http server
|
## Controling http server
|
||||||
|
|
||||||
```
|
```
|
||||||
|
# reload
|
||||||
|
$ docker exec -it apache "httpd -k graceful"
|
||||||
|
# restart
|
||||||
$ docker exec -it apache "httpd -k restart"
|
$ docker exec -it apache "httpd -k restart"
|
||||||
```
|
```
|
||||||
for more commands :
|
for more commands :
|
||||||
```
|
```
|
||||||
$ docker exec -it apache "httpd -h"
|
$ 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
|
||||||
|
[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
|
||||||
|
[10]: https://github.com/pluie-org/docker-images/tree/master/pluie/libecho
|
||||||
|
[11]: https://github.com/pluie-org/docker-images/tree/master/pluie/libyaml
|
||||||
|
[12]: https://github.com/pluie-org/docker-images/tree/master/pluie/ubuntu
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
Ctitle="\033[1;38;5;15;1;48;5;30m"
|
Ctitle="\033[1;38;5;15;1;48;5;30m"
|
||||||
Citem="\033[1;38;5;36m"
|
Citem="\033[1;38;5;36m"
|
||||||
|
@ -13,7 +14,7 @@ DOCKBUILD=$(basename $DOCKDIR)
|
||||||
cd $DOCKDIR
|
cd $DOCKDIR
|
||||||
echo -e "\n ${Ctitle} Preparing files : ${Coff}${Citem}\n"
|
echo -e "\n ${Ctitle} Preparing files : ${Coff}${Citem}\n"
|
||||||
|
|
||||||
tar -cvf files.tar *.sh pre-init.d/ install.d/ | sed "s/^/${indent}* /"
|
tar -cvf files.tar *.sh pre-init.d/ install.d/ | sed "s/^/${indent}↠ /"
|
||||||
|
|
||||||
echo -e "\n ${Ctitle} Proceed Dockerfile build : ${Coff}\n
|
echo -e "\n ${Ctitle} Proceed Dockerfile build : ${Coff}\n
|
||||||
"
|
"
|
||||||
|
|
Binary file not shown.
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
apk --update add apache2 \
|
apk add apache2 apache2-proxy \
|
||||||
php-apache2 php-cli php-phar php-zlib php-zip php-ctype php-mysqli php-pdo_mysql php-xml \
|
php5-apache2 php5-cli php5-phar php5-zlib php5-zip php5-ctype php5-mysqli php5-xml php5-pdo_mysql \
|
||||||
php-opcache php-pdo php-json php-curl php-gd php-mcrypt php-openssl \
|
php5-opcache php5-pdo php5-json php5-curl php5-gd php5-mcrypt php5-openssl php5-dom \
|
||||||
# php-pdo_odbc php-soap php-pgsql
|
# php-pdo_odbc php-soap php-pgsql
|
||||||
|
|
|
@ -1,11 +1,43 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @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/libxml2.so ]; then
|
||||||
|
ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so
|
||||||
|
fi
|
||||||
|
if [ ! -d /run/apache2 ]; then
|
||||||
|
mkdir /run/apache2
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p /app/www
|
|
||||||
chown -R 1000:apache /app/www
|
|
||||||
chmod -R 755 /scripts/pre-init.d
|
chmod -R 755 /scripts/pre-init.d
|
||||||
sed -i 's#^DocumentRoot ".*#DocumentRoot "/app/www"#g' /etc/apache2/httpd.conf
|
mkdir -p /run/apache2
|
||||||
sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf
|
chown apache:apache /run/apache2
|
||||||
sed -ir 's/expose_php = On/expose_php = Off/' /etc/php/php.ini
|
|
||||||
|
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/php5/php.ini
|
||||||
|
sed -ir 's/expose_php = On/expose_php = Off/' /etc/php5/php.ini
|
||||||
echo -e "\nIncludeOptional /app/vhost" >> /etc/apache2/httpd.conf
|
echo -e "\nIncludeOptional /app/vhost" >> /etc/apache2/httpd.conf
|
||||||
rm -f /scripts/pre-init.d/50-example.sh
|
unset tmpsed
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
. /scripts/common.sh
|
. /scripts/common.sh
|
||||||
|
|
||||||
echo "[[ Starting Apache Daemon ]]"
|
initTitle "Starting" "Apache Daemon"
|
||||||
httpd -D FOREGROUND
|
httpd -D FOREGROUND
|
||||||
|
|
|
@ -1,8 +1,20 @@
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
if [ ! -z "$FIX_OWNERSHIP" ] && [ "$FIX_OWNERSHIP" -eq 1 ]; then
|
if [ ! -d /app/$WWW_DIR ]; then
|
||||||
chown -R 1000:apache /app/www
|
CREATE_WWW_DIR=1
|
||||||
|
mkdir -p /app/$WWW_DIR
|
||||||
|
fi
|
||||||
|
if [ ! -f /app/$WWW_DIR/$WWW_INDEX ]; then
|
||||||
|
echo "<?php phpinfo();" > /app/$WWW_DIR/$WWW_INDEX
|
||||||
|
fi
|
||||||
|
tmpsed=/etc/apache2/httpd.conf
|
||||||
|
sed -i 's#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g' "$tmpsed"
|
||||||
|
sed -i 's#AllowOverride none#AllowOverride All#' "$tmpsed"
|
||||||
|
|
||||||
|
if [ ! -z "$FIX_OWNERSHIP" ] && [ "$FIX_OWNERSHIP" -eq 1 ] && [ -d /app/$WWW_DIR ]; then
|
||||||
|
chown -R 1000:apache /app/$WWW_DIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch /var/log/apache2/error.log
|
touch /var/log/apache2/error.log
|
||||||
|
|
|
@ -1,19 +1,21 @@
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
if [ ! -z "/app/vhost" ]; then
|
if [ ! -z "/app/vhost" ]; then
|
||||||
cat <<EOF > "/app/vhost"
|
cat <<EOF > "/app/vhost"
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName $HTTP_SERVER_NAME
|
ServerName $HTTP_SERVER_NAME
|
||||||
<Directory /app/www>
|
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=\$1
|
||||||
|
<Directory /app/$WWW_DIR>
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Allow from all
|
Require all granted
|
||||||
DirectoryIndex index.php
|
DirectoryIndex $WWW_INDEX
|
||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
Options -MultiViews +FollowSymlinks
|
Options -MultiViews +FollowSymlinks
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteRule ^ index.php [QSA,L]
|
RewriteRule ^ $WWW_INDEX [QSA,L]
|
||||||
</IfModule>
|
</IfModule>
|
||||||
</Directory>
|
</Directory>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
4
pluie/alpine-apache/pre-init.d/30-tz.sh
Normal file
4
pluie/alpine-apache/pre-init.d/30-tz.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
tmpsed="/etc/php5/php.ini"
|
||||||
|
sed -i "s|;*date.timezone =.*|date.timezone = ${TZ}|i" $tmpsed
|
||||||
|
cat $tmpsed | grep "date.timezone"
|
20
pluie/alpine-fpm-php7/Dockerfile
Normal file
20
pluie/alpine-fpm-php7/Dockerfile
Normal file
|
@ -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=php7.docker \
|
||||||
|
WWW_DIR=www \
|
||||||
|
WWW_INDEX=index.php \
|
||||||
|
FIX_OWNERSHIP=1 \
|
||||||
|
TZ=Europe/Paris
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
RUN bash /scripts/install.sh
|
102
pluie/alpine-fpm-php7/README.md
Normal file
102
pluie/alpine-fpm-php7/README.md
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
# pluie/alpine-apache-php7
|
||||||
|
|
||||||
|
- [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 )
|
||||||
|
- [pluie/libecho][10] ( ~288 MB ) Vala 0.34.2 pluie-echo-0.2
|
||||||
|
- [pluie/ubuntu][12] ( ~141 MB ) Ubuntu 18.04
|
||||||
|
- [pluie/libyaml][11] ( ~538 MB ) Vala 0.40.4 pluie-yaml-0.4
|
||||||
|
- [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 ~ 50 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
|
||||||
|
[9]: https://github.com/pluie-org/docker-images/tree/master/pluie/alpine-symfony-php7
|
||||||
|
[10]: https://github.com/pluie-org/docker-images/tree/master/pluie/libecho
|
||||||
|
[11]: https://github.com/pluie-org/docker-images/tree/master/pluie/libyaml
|
||||||
|
[12]: https://github.com/pluie-org/docker-images/tree/master/pluie/ubuntu
|
22
pluie/alpine-fpm-php7/build
Executable file
22
pluie/alpine-fpm-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-fpm-php7/files.tar
Normal file
BIN
pluie/alpine-fpm-php7/files.tar
Normal file
Binary file not shown.
8
pluie/alpine-fpm-php7/install.d/00-repo.sh
Normal file
8
pluie/alpine-fpm-php7/install.d/00-repo.sh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine-apache-php7
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
#
|
||||||
|
#~ echo "http://dl-5.alpinelinux.org/alpine/edge/community
|
||||||
|
#~ http://dl-5.alpinelinux.org/alpine/edge/main
|
||||||
|
#~ http://dl-5.alpinelinux.org/alpine/edge/testing
|
||||||
|
#~ " > /etc/apk/repositories
|
9
pluie/alpine-fpm-php7/install.d/10-apache.sh
Executable file
9
pluie/alpine-fpm-php7/install.d/10-apache.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
apk add apache2 apache2-proxy apache2-proxy-html apache-mod-fcgid php7-fpm \
|
||||||
|
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
|
60
pluie/alpine-fpm-php7/install.d/50-fix-apache.sh
Executable file
60
pluie/alpine-fpm-php7/install.d/50-fix-apache.sh
Executable file
|
@ -0,0 +1,60 @@
|
||||||
|
#!/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/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
|
||||||
|
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_event"
|
||||||
|
a2setModule 1 "slotmem_shm"
|
||||||
|
a2setModule 1 "heartmonitor"
|
||||||
|
a2setModule 1 "watchdog"
|
||||||
|
initTitle "Apache" "Removing Modules"
|
||||||
|
a2setModule 0 "mpm_prefork"
|
||||||
|
a2setModule 0 "proxy_fdpass" /etc/apache2/conf.d/proxy.conf
|
||||||
|
echo
|
||||||
|
tmpsed="/etc/php7/php.ini"
|
||||||
|
sed -ir 's/expose_php = On/expose_php = Off/' $tmpsed
|
||||||
|
sed -i "s|;*date.timezone =.*|date.timezone = ${TZ}|i" $tmpsed
|
||||||
|
sed -i "s|;*cgi.fix_pathinfo=.*|cgi.fix_pathinfo= 0|i" $tmpsed
|
||||||
|
tmpsed="/etc/php7/php-fpm.conf"
|
||||||
|
sed -i "s|;*daemonize\s*=\s*yes|daemonize = no|g" $tmpsed
|
||||||
|
sed -i "s|;*listen\s*=\s*127.0.0.1:9000|listen = 9000|g" $tmpsed
|
||||||
|
sed -i "s|;*listen\s*=\s*/||g" $tmpsed
|
||||||
|
sed -i "s|pm = dynamic|pm = ondemand|g" $tmpsed
|
||||||
|
echo -e "\nIncludeOptional /app/vhost" >> /etc/apache2/httpd.conf
|
||||||
|
unset tmpsed
|
8
pluie/alpine-fpm-php7/main.sh
Executable file
8
pluie/alpine-fpm-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
|
11
pluie/alpine-fpm-php7/pre-init.d/10-apache.sh
Executable file
11
pluie/alpine-fpm-php7/pre-init.d/10-apache.sh
Executable file
|
@ -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 &
|
27
pluie/alpine-fpm-php7/pre-init.d/10-vhost.sh
Executable file
27
pluie/alpine-fpm-php7/pre-init.d/10-vhost.sh
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
if [ ! -z "/app/vhost" ]; then
|
||||||
|
cat <<EOF > "/app/vhost"
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName $HTTP_SERVER_NAME
|
||||||
|
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
|
||||||
|
<FilesMatch \.php$>
|
||||||
|
SetHandler proxy:fcgi://127.0.0.1:9000
|
||||||
|
</FilesMatch>
|
||||||
|
<Directory /app/$WWW_DIR>
|
||||||
|
AllowOverride None
|
||||||
|
Require all granted
|
||||||
|
DirectoryIndex $WWW_INDEX
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
Options -MultiViews +FollowSymlinks
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ $WWW_INDEX [QSA,L]
|
||||||
|
</IfModule>
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
# IncludeOptional /app/vhost2
|
||||||
|
EOF
|
||||||
|
fi
|
4
pluie/alpine-fpm-php7/pre-init.d/30-tz.sh
Normal file
4
pluie/alpine-fpm-php7/pre-init.d/30-tz.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
tmpsed="/etc/php7/php.ini"
|
||||||
|
sed -i "s|;*date.timezone =.*|date.timezone = ${TZ}|i" $tmpsed
|
||||||
|
cat $tmpsed | grep "date.timezone"
|
|
@ -4,10 +4,11 @@ MAINTAINER a-Sansara https://github.com/a-sansara
|
||||||
|
|
||||||
ADD files.tar /scripts
|
ADD files.tar /scripts
|
||||||
|
|
||||||
RUN bash /scripts/install.sh
|
ENV SHENV_NAME=Mysql \
|
||||||
|
SHENV_COLOR=132
|
||||||
ENV SHENV_NAME=Mysql SHENV_COLOR=132
|
|
||||||
|
|
||||||
EXPOSE 3306
|
EXPOSE 3306
|
||||||
|
|
||||||
VOLUME ["/var/lib/mysql", "/dump"]
|
VOLUME ["/var/lib/mysql", "/dump"]
|
||||||
|
|
||||||
|
RUN bash /scripts/install.sh
|
||||||
|
|
|
@ -1,64 +1,146 @@
|
||||||
# pluie/alpine-mysql
|
# pluie/alpine-mysql
|
||||||
|
|
||||||
Extend pluie/alpine with mysql (mariadb) 5.5.47
|
- [index][1]
|
||||||
|
- [pluie/alpine][2] ( ~ 9 MB ) Alpine/3.5
|
||||||
|
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.25 Php/5.6.30
|
||||||
|
- [pluie/alpine-apache-fpm][7] ( ~ 51 MB ) Apache/2.4.25 Php/5.6.30 Fpm
|
||||||
|
- [pluie/alpine-symfony][6] ( ~ 83 MB ) Symfony2.8 or 3.2
|
||||||
|
- [pluie/alpine-apache-php7][8] ( ~ 45 MB ) Apache/2.4.25 Php/7.0.16
|
||||||
|
- [pluie/alpine-symfony-php7][9] ( ~ 77 MB ) Symfony2.8 or 3.2 Php/7.0.16
|
||||||
|
- [pluie/alpine-mysql][4] ( ~181 MB ) Mysql/5.6 ( MariaDB )
|
||||||
|
- [pluie/libecho][10] ( ~288 MB ) Vala 0.34.2 pluie-echo-0.2
|
||||||
|
- [pluie/ubuntu][12] ( ~141 MB ) Ubuntu 18.04
|
||||||
|
- [pluie/libyaml][11] ( ~538 MB ) Vala 0.40.4 pluie-yaml-0.4
|
||||||
|
- [docker tips][5]
|
||||||
|
|
||||||
|
Extend pluie/alpine with mysql (MariaDb/10.1.22)
|
||||||
|
Project comes with various scripts to execute basic tasks such as :
|
||||||
|
- dbcreate
|
||||||
|
- dbdump
|
||||||
|
- dbload
|
||||||
|
|
||||||
|
If database directory is empty a root user is created at startup.
|
||||||
|
Root access to database is only permit on localhost
|
||||||
|
|
||||||
## Image Size
|
## Image Size
|
||||||
|
|
||||||
- image ~ 160 MB
|
- image ~ 181 MB
|
||||||
|
|
||||||
## Image Volumes
|
## Image Volumes
|
||||||
|
|
||||||
__/var/lib/mysql__ : mysql database directory
|
```
|
||||||
__/dump__ : directory to store various mysql scripts
|
/var/lib/mysql # mysql database directory
|
||||||
|
/dump # directory to store various mysql scripts
|
||||||
|
```
|
||||||
|
|
||||||
## ENV variables
|
## ENV variables
|
||||||
|
|
||||||
__MYSQL_DATABASE__ : create specified database at startup
|
```
|
||||||
__MYSQL_USER__ : create specified user at startup (and grant all rights to __MYSQL_DATABASE__)
|
MYSQL_DATABASE # create specified database at startup
|
||||||
__MYSQL_PASSWORD__
|
MYSQL_USER # create specified user at startup (and grant all rights to MYSQL_DATABASE)
|
||||||
__MYSQL_ROOT_PASSWORD__ : don't really need it. a random root password is generated if none
|
MYSQL_PASSWORD
|
||||||
|
MYSQL_ROOT_PASSWORD # don't really need it. a random root password is generated if none
|
||||||
|
```
|
||||||
|
|
||||||
|
### Inherit ENV variables
|
||||||
|
|
||||||
|
```
|
||||||
|
SHENV_CTX=LOCAL # LOCAL|INT|PROD change context bg color
|
||||||
|
SHENV_NAME=Mysql # container name
|
||||||
|
SHENV_COLOR=97 # ANSI EXTENDED COLOR CODE
|
||||||
|
```
|
||||||
|
|
||||||
## Image Usage
|
## Image Usage
|
||||||
|
|
||||||
|
for example to start a new project :
|
||||||
```
|
```
|
||||||
$ docker run --name mysql -p 3306 -v /home/docker/db/mysql:/var/lib/mysql -v /home/docker/db/dump:/dump -e MYSQL_DATABASE=mybase -e MYSQL_USER=dev -e MYSQL_PASSWORD=mysql -it pluie/alpine-mysqldocker
|
$ cd /home/docker;
|
||||||
|
$ mkdir -p db/{mysql,dump}
|
||||||
|
|
||||||
|
$ docker run --name mysql \
|
||||||
|
-v $(pwd)/db/mysql:/var/lib/mysql \
|
||||||
|
-v $(pwd)/db/dump:/dump \
|
||||||
|
-e MYSQL_DATABASE=mybase \
|
||||||
|
-e MYSQL_USER=dev \
|
||||||
|
-e MYSQL_PASSWORD=mysql \
|
||||||
|
-it pluie/alpine-mysql
|
||||||
|
```
|
||||||
|
you don't need to expose your localhost mysql port.
|
||||||
|
for example :
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker run --name pma -p 8080:80 --link mysql:db -d phpmyadmin/phpmyadmin
|
||||||
```
|
```
|
||||||
|
|
||||||
### Root Usage
|
and __phpmyadmin__ is accessible via `http://localhost:8080/` and linked to your mysql container
|
||||||
|
(by the way on dev, you don't need to expose your 8080 port too... simply use a bridge network and update your
|
||||||
|
`/etc/hosts` file - see [ docker tips ][5] for that)
|
||||||
|
|
||||||
a root user is created at startup (if database directory is empty)
|
### Existing Scripts
|
||||||
root login is permit only on localhost
|
|
||||||
to do things without files you can run :
|
create a new database with full rights to a user :
|
||||||
```
|
```
|
||||||
$ docker exec -it mysql "mysql -uroot"
|
$ docker exec -it mysql /dbcreate mydbname myuser
|
||||||
```
|
```
|
||||||
to do things with files you can log in to container :
|
load an export file in particular database :
|
||||||
|
```
|
||||||
|
$ docker exec -it mysql /dbload mydbname /dump/mydbname.init.sql
|
||||||
|
```
|
||||||
|
dump a database :
|
||||||
|
```
|
||||||
|
$ docker exec -it mysql /dbdump mydbname
|
||||||
|
```
|
||||||
|
|
||||||
|
### More specific actions as user
|
||||||
|
|
||||||
|
to connect to the mysql server as user from host :
|
||||||
|
```
|
||||||
|
mysql -h ipmysqlcontainer -udev -pmysql
|
||||||
|
```
|
||||||
|
to retriew container ip you can run first :
|
||||||
|
```
|
||||||
|
docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mysql
|
||||||
|
```
|
||||||
|
to connect to the mysql server as user from container :
|
||||||
|
```
|
||||||
|
$ docker exec -it mysql "mysql -udev -pmysql"
|
||||||
|
```
|
||||||
|
|
||||||
|
### More specific actions as root
|
||||||
|
|
||||||
|
to connect to the mysql server as root :
|
||||||
|
```
|
||||||
|
$ docker exec -it mysql mysql
|
||||||
|
```
|
||||||
|
to connect to the mysql container as root :
|
||||||
```
|
```
|
||||||
docker exec -it mysql bash
|
docker exec -it mysql bash
|
||||||
```
|
```
|
||||||
then
|
then
|
||||||
```
|
```
|
||||||
$ mysql -uroot mybase < /dump/mydump.sql
|
$ mysql -uroot mybase < /dump/init.mybase.sql
|
||||||
|
$ mysqldump -uroot mybase > /dump/last.mybase.dump.sql
|
||||||
```
|
```
|
||||||
etc.
|
etc.
|
||||||
|
|
||||||
|
|
||||||
### User usage
|
|
||||||
|
|
||||||
locally (on host) you can run (with appropriate user : pass) :
|
|
||||||
```
|
|
||||||
mysql -h ipmysqlcontainer -udev -pmysql
|
|
||||||
```
|
|
||||||
or if you want use the mysql client of the container :
|
|
||||||
```
|
|
||||||
docker exec -it mysql "mysql -h ipmysqlcontainer -udev -pmysql"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Link Container
|
## Link Container
|
||||||
|
|
||||||
to link this container to another, use the default docker behavior :
|
to link this container to another, use the default docker behavior
|
||||||
|
(as the example provide with phpmyadmin) :
|
||||||
```
|
```
|
||||||
docker run --name mycontainer --link mysql:db ...
|
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
|
||||||
|
[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
|
||||||
|
[10]: https://github.com/pluie-org/docker-images/tree/master/pluie/libecho
|
||||||
|
[11]: https://github.com/pluie-org/docker-images/tree/master/pluie/libyaml
|
||||||
|
[12]: https://github.com/pluie-org/docker-images/tree/master/pluie/ubuntu
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine-mysql
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
Ctitle="\033[1;38;5;15;1;48;5;30m"
|
Ctitle="\033[1;38;5;15;1;48;5;30m"
|
||||||
Citem="\033[1;38;5;36m"
|
Citem="\033[1;38;5;36m"
|
||||||
|
@ -13,7 +14,7 @@ DOCKBUILD=$(basename $DOCKDIR)
|
||||||
cd $DOCKDIR
|
cd $DOCKDIR
|
||||||
echo -e "\n ${Ctitle} Preparing files : ${Coff}${Citem}\n"
|
echo -e "\n ${Ctitle} Preparing files : ${Coff}${Citem}\n"
|
||||||
|
|
||||||
tar -cvf files.tar *.sh pre-init.d/ install.d/ | sed "s/^/${indent}* /"
|
tar -cvf files.tar *.sh pre-init.d/ install.d/ | sed "s/^/${indent}↠ /"
|
||||||
|
|
||||||
echo -e "\n ${Ctitle} Proceed Dockerfile build : ${Coff}\n
|
echo -e "\n ${Ctitle} Proceed Dockerfile build : ${Coff}\n
|
||||||
"
|
"
|
||||||
|
|
36
pluie/alpine-mysql/dbcommon.sh
Normal file
36
pluie/alpine-mysql/dbcommon.sh
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine-mysql
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
Ctitle="\033[1;48;5;30;1;38;5;15m"
|
||||||
|
Ctext="\033[1;38;5;30m"
|
||||||
|
Copt="\033[1;38;5;72m"
|
||||||
|
Cspe="\033[1;38;5;30m"
|
||||||
|
Cerr="\033[1;38;5;196m"
|
||||||
|
Cusa="\033[1;38;5;214m"
|
||||||
|
Coff="\033[m"
|
||||||
|
|
||||||
|
function echoTitle(){
|
||||||
|
echo -e "\n ${Ctitle} $shname ${Coff}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function mktfile(){
|
||||||
|
tfile="$(mktemp)"
|
||||||
|
if [ ! -f "$tfile" ]; then
|
||||||
|
echoErr "can't make temp file" 1
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function errEmptyDb(){
|
||||||
|
echoErr "database can't be empty"
|
||||||
|
}
|
||||||
|
|
||||||
|
function echoErr(){
|
||||||
|
echo -e "\n${Cerr} error : $1${Coff}"
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
43
pluie/alpine-mysql/dbcreate.sh
Executable file
43
pluie/alpine-mysql/dbcreate.sh
Executable file
|
@ -0,0 +1,43 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine-mysql
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
. /scripts/dbcommon.sh
|
||||||
|
|
||||||
|
dbname=${1:-''}
|
||||||
|
dbuser=${2:-''}
|
||||||
|
shname=$(basename $0)
|
||||||
|
|
||||||
|
echoTitle
|
||||||
|
|
||||||
|
function usage(){
|
||||||
|
echo -e "\n ${Cusa}usage :${Coff}\n ${Ctext}$shname \t${Copt}DBNAME ${Cspe}[${Copt}USER${Cspe}]${Coff}"
|
||||||
|
}
|
||||||
|
|
||||||
|
mktfile
|
||||||
|
|
||||||
|
if [ ! -z "$dbname" ]; then
|
||||||
|
cat <<EOF > "$tfile"
|
||||||
|
CREATE DATABASE IF NOT EXISTS \`$dbname\` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ ! -z "$dbuser" ]; then
|
||||||
|
cat <<EOF >> "$tfile"
|
||||||
|
GRANT ALL ON \`$dbname\`.* to '$dbuser'@'localhost';
|
||||||
|
GRANT ALL ON \`$dbname\`.* to '$dbuser'@'%';
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "FLUSH PRIVILEGES;" >> "$tfile"
|
||||||
|
echo
|
||||||
|
cat "$tfile" | sed "s/^/ /";
|
||||||
|
echo
|
||||||
|
mysql -uroot < "$tfile"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo -e "\n done"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
rm -f "$tfile"
|
||||||
|
else
|
||||||
|
errEmptyDb
|
||||||
|
fi
|
23
pluie/alpine-mysql/dbdump.sh
Executable file
23
pluie/alpine-mysql/dbdump.sh
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
||||||
|
|
||||||
|
. /scripts/dbcommon.sh
|
||||||
|
|
||||||
|
dbname=${1:-''}
|
||||||
|
shname=$(basename $0)
|
||||||
|
|
||||||
|
echoTitle
|
||||||
|
|
||||||
|
function usage(){
|
||||||
|
echo -e "\n ${Cusa}usage :${Coff}\n ${Ctext}$shname \t${Copt}DBNAME USER${Coff}"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ ! -z "$1" ]; then
|
||||||
|
mysqldump -uroot "$dbname" > "/dump/"$(date +"%y%m%d-%H%I")".$dbname.sql"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo -e "\n done"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
errEmptyDb
|
||||||
|
fi
|
29
pluie/alpine-mysql/dbload.sh
Executable file
29
pluie/alpine-mysql/dbload.sh
Executable file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine-mysql
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
. /scripts/dbcommon.sh
|
||||||
|
|
||||||
|
dbname=${1:-''}
|
||||||
|
filename=${2}
|
||||||
|
shname=$(basename $0)
|
||||||
|
|
||||||
|
echoTitle
|
||||||
|
|
||||||
|
function usage(){
|
||||||
|
echo -e "\n ${Cusa}usage :${Coff}\n ${Ctext}$shname \t${Copt}DBNAME FILENAME${Coff}"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ ! -f "$filename" ]; then
|
||||||
|
echoErr "unknow file '$filename'"
|
||||||
|
fi
|
||||||
|
if [ ! -z "$1" ]; then
|
||||||
|
mysql -uroot "$dbname" < "$filename"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo -e "\n done"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
errEmptyDb
|
||||||
|
fi
|
||||||
|
|
Binary file not shown.
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine-mysql
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
apk --update add mysql mysql-client pwgen \
|
apk add mysql mysql-client pwgen \
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
chown -R root:root /scripts/
|
|
||||||
rm -f /scripts/pre-init.d/50-example.sh
|
|
7
pluie/alpine-mysql/install.d/40-scripts-fix.sh
Normal file
7
pluie/alpine-mysql/install.d/40-scripts-fix.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine-mysql
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
mv /scripts/dbdump.sh /dbdump
|
||||||
|
mv /scripts/dbcreate.sh /dbcreate
|
||||||
|
mv /scripts/dbload.sh /dbload
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine-mysql
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
. /scripts/common.sh
|
. /scripts/common.sh
|
||||||
|
|
||||||
echo "[[ Starting Mysql Daemon ]]"
|
|
||||||
exec /usr/bin/mysqld --user=mysql --console
|
exec /usr/bin/mysqld --user=mysql --console
|
||||||
|
|
|
@ -1,5 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine-mysql
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
. /scripts/util.sh
|
||||||
|
|
||||||
|
function mysql.secure(){
|
||||||
|
chown mysql:mysql $1
|
||||||
|
sleep 5
|
||||||
|
initTitle "SECURING" "DATABASE"
|
||||||
|
echo "please wait."
|
||||||
|
sleep 5
|
||||||
|
rm -f $1
|
||||||
|
echo "done"
|
||||||
|
}
|
||||||
|
|
||||||
if [ ! -d "/run/mysqld" ]; then
|
if [ ! -d "/run/mysqld" ]; then
|
||||||
mkdir -p /run/mysqld
|
mkdir -p /run/mysqld
|
||||||
|
@ -7,9 +20,10 @@ if [ ! -d "/run/mysqld" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d /var/lib/mysql/mysql ]; then
|
if [ ! -d /var/lib/mysql/mysql ]; then
|
||||||
echo "[[ Initialize DB ]]"
|
|
||||||
|
initTitle "Initialize" "DATABASE"
|
||||||
chown -R mysql:mysql /var/lib/mysql
|
chown -R mysql:mysql /var/lib/mysql
|
||||||
mysql_install_db --user=mysql > /dev/null
|
mysql_install_db --user=mysql --verbose=1 --basedir=/usr --datadir=/var/lib/mysql --rpm > /dev/null
|
||||||
|
|
||||||
if [ -z "$MYSQL_ROOT_PASSWORD" ]; then
|
if [ -z "$MYSQL_ROOT_PASSWORD" ]; then
|
||||||
MYSQL_ROOT_PASSWORD=`pwgen -y -s 18 1`
|
MYSQL_ROOT_PASSWORD=`pwgen -y -s 18 1`
|
||||||
|
@ -24,20 +38,19 @@ if [ ! -d /var/lib/mysql/mysql ]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat << EOF > $tfile
|
cat <<-EOF > $tfile
|
||||||
USE mysql;
|
UPDATE mysql.user SET password=PASSWORD('$MYSQL_ROOT_PASSWORD') WHERE user='root';
|
||||||
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
|
DELETE FROM mysql.user WHERE user='root' AND host NOT IN ('localhost', '127.0.0.1', '::1', '$(hostname)');
|
||||||
UPDATE user SET password=PASSWORD("$MYSQL_ROOT_PASSWORD") WHERE user='root';
|
DELETE FROM mysql.user WHERE user='';
|
||||||
|
DELETE FROM mysql.db WHERE db='test' OR db='test\_%';
|
||||||
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
|
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
|
||||||
UPDATE user SET password=PASSWORD("") WHERE user='root' AND host='localhost';
|
UPDATE mysql.user SET password=PASSWORD("") WHERE user='root' AND host='localhost';
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ ! -z "$MYSQL_DATABASE" ]; then
|
if [ ! -z "$MYSQL_DATABASE" ]; then
|
||||||
echo "[[ CREATE DATABASE $MYSQL_DATABASE ]]";
|
|
||||||
echo "CREATE DATABASE IF NOT EXISTS \`$MYSQL_DATABASE\` CHARACTER SET utf8 COLLATE utf8_general_ci;" >> $tfile
|
echo "CREATE DATABASE IF NOT EXISTS \`$MYSQL_DATABASE\` CHARACTER SET utf8 COLLATE utf8_general_ci;" >> $tfile
|
||||||
fi
|
fi
|
||||||
if [ "$MYSQL_USER" != "" ] && [ "$MYSQL_USER" != 'root' ]; then
|
if [ "$MYSQL_USER" != "" ] && [ "$MYSQL_USER" != 'root' ]; then
|
||||||
echo "[[ CREATE USER $MYSQL_USER ]]";
|
|
||||||
echo "
|
echo "
|
||||||
CREATE USER '$MYSQL_USER'@'localhost' IDENTIFIED BY '$MYSQL_PASSWORD';
|
CREATE USER '$MYSQL_USER'@'localhost' IDENTIFIED BY '$MYSQL_PASSWORD';
|
||||||
CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD';" >> $tfile
|
CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD';" >> $tfile
|
||||||
|
@ -47,6 +60,14 @@ GRANT ALL ON \`$MYSQL_DATABASE\`.* to '$MYSQL_USER'@'localhost' IDENTIFIED BY '$
|
||||||
GRANT ALL ON \`$MYSQL_DATABASE\`.* to '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD';" >> $tfile
|
GRANT ALL ON \`$MYSQL_DATABASE\`.* to '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD';" >> $tfile
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
/usr/bin/mysqld --user=mysql --bootstrap --skip-grant-tables=0 --verbose=0 < $tfile
|
echo "FLUSH PRIVILEGES;" >> $tfile
|
||||||
rm -f $tfile
|
|
||||||
|
mysql.secure $tfile &
|
||||||
|
|
||||||
|
initTitle "Starting" "Mysql Daemon"
|
||||||
|
exec /usr/bin/mysqld --user=mysql --console --init-file="$tfile"
|
||||||
|
|
||||||
|
else
|
||||||
|
initTitle "Skipping" "DB init"
|
||||||
|
initTitle "Starting" "Mysql Daemon"
|
||||||
fi
|
fi
|
||||||
|
|
1
pluie/alpine-symfony-php7/.gitignore
vendored
Normal file
1
pluie/alpine-symfony-php7/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
files.tar
|
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
|
88
pluie/alpine-symfony-php7/README.md
Normal file
88
pluie/alpine-symfony-php7/README.md
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
# pluie/alpine-symfony-php7
|
||||||
|
|
||||||
|
- [index][1]
|
||||||
|
- [pluie/alpine][2] ( ~ 9 MB ) Alpine/3.5
|
||||||
|
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.25 Php/5.6.30
|
||||||
|
- [pluie/alpine-apache-fpm][7] ( ~ 51 MB ) Apache/2.4.25 Php/5.6.30 Fpm
|
||||||
|
- [pluie/alpine-symfony][6] ( ~ 83 MB ) Symfony2.8 or 3.2
|
||||||
|
- [pluie/alpine-apache-php7][8] ( ~ 45 MB ) Apache/2.4.25 Php/7.0.16
|
||||||
|
- [pluie/alpine-symfony-php7][9] ( ~ 77 MB ) Symfony2.8 or 3.2 Php/7.0.16
|
||||||
|
- [pluie/alpine-mysql][4] ( ~181 MB ) Mysql/5.6 ( MariaDB )
|
||||||
|
- [pluie/libecho][10] ( ~288 MB ) Vala 0.34.2 pluie-echo-0.2
|
||||||
|
- [pluie/ubuntu][12] ( ~141 MB ) Ubuntu 18.04
|
||||||
|
- [pluie/libyaml][11] ( ~538 MB ) Vala 0.40.4 pluie-yaml-0.4
|
||||||
|
- [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 ~ 77 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
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run the console
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker exec -it symfony php /app/bin/console --ansi
|
||||||
|
```
|
||||||
|
|
||||||
|
[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
|
||||||
|
[10]: https://github.com/pluie-org/docker-images/tree/master/pluie/libecho
|
||||||
|
[11]: https://github.com/pluie-org/docker-images/tree/master/pluie/libyaml
|
||||||
|
[12]: https://github.com/pluie-org/docker-images/tree/master/pluie/ubuntu
|
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 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
|
15
pluie/alpine-symfony-php7/pre-init.d/10-symfony.sh
Executable file
15
pluie/alpine-symfony-php7/pre-init.d/10-symfony.sh
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine-symfony
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
if [ ! -z "$CREATE_WWW_DIR" ]; then
|
||||||
|
cd /tmp
|
||||||
|
symfony new app $SYMFONY_VERSION
|
||||||
|
rm -rf /app/web
|
||||||
|
mv -f app/* /app/
|
||||||
|
chown -R 1000:apache /app/
|
||||||
|
chown -R 774:apache /app/var
|
||||||
|
chmod -R g+w /app
|
||||||
|
CTN_IP=$(ip route | cut -d ' ' -f3 | head -n1)
|
||||||
|
sed -i "/::1/s//::1', '$CTN_IP/" /app/web/app_dev.php
|
||||||
|
fi
|
19
pluie/alpine-symfony/Dockerfile
Normal file
19
pluie/alpine-symfony/Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# @app pluie/alpine-symfony
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
FROM pluie/alpine-apache-fpm
|
||||||
|
|
||||||
|
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
|
84
pluie/alpine-symfony/README.md
Normal file
84
pluie/alpine-symfony/README.md
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
# pluie/alpine-symfony
|
||||||
|
|
||||||
|
- [index][1]
|
||||||
|
- [pluie/alpine][2] ( ~ 9 MB ) Alpine/3.5
|
||||||
|
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.25 Php/5.6.30
|
||||||
|
- [pluie/alpine-apache-fpm][7] ( ~ 51 MB ) Apache/2.4.25 Php/5.6.30 Fpm
|
||||||
|
- [pluie/alpine-symfony][6] ( ~ 83 MB ) Symfony2.8 or 3.2
|
||||||
|
- [pluie/alpine-apache-php7][8] ( ~ 45 MB ) Apache/2.4.25 Php/7.0.16
|
||||||
|
- [pluie/alpine-symfony-php7][9] ( ~ 77 MB ) Symfony2.8 or 3.2 Php/7.0.16
|
||||||
|
- [pluie/alpine-mysql][4] ( ~181 MB ) Mysql/5.6 ( MariaDB )
|
||||||
|
- [pluie/libecho][10] ( ~288 MB ) Vala 0.34.2 pluie-echo-0.2
|
||||||
|
- [pluie/ubuntu][12] ( ~141 MB ) Ubuntu 18.04
|
||||||
|
- [pluie/libyaml][11] ( ~538 MB ) Vala 0.40.4 pluie-yaml-0.4
|
||||||
|
- [docker tips][5]
|
||||||
|
|
||||||
|
Extend pluie/alpine-apache-fpm.
|
||||||
|
|
||||||
|
if __/app/$WWW_DIR__ does not exits then __pluie/alpine-symfony__ install
|
||||||
|
the symfony framework with `$SYMFONY_VERSION` version on the `/app` directory
|
||||||
|
|
||||||
|
## Image Size
|
||||||
|
|
||||||
|
- image ~ 83 MB
|
||||||
|
|
||||||
|
## ENV variables
|
||||||
|
|
||||||
|
```
|
||||||
|
SYMFONY_VERSION=3.1 # 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
|
||||||
|
- __/etc/php5/fpm.d/__ to customize fpm
|
||||||
|
|
||||||
|
|
||||||
|
## Image Usage
|
||||||
|
|
||||||
|
chdir to your project directory
|
||||||
|
```
|
||||||
|
$ docker run --name symfony -it --link=mysql:db -v $(pwd):/app pluie/alpine-symfony
|
||||||
|
```
|
||||||
|
or
|
||||||
|
```
|
||||||
|
$ docker run --name symfony -d --link=mysql:db -e HTTP_SERVER_NAME=yourServerName -v $(pwd):/app pluie/alpine-symfony
|
||||||
|
```
|
||||||
|
|
||||||
|
## Connect to container
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker exec -it symfony bash
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run the console
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker exec -it symfony php /app/bin/console --ansi
|
||||||
|
```
|
||||||
|
|
||||||
|
[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
|
||||||
|
[10]: https://github.com/pluie-org/docker-images/tree/master/pluie/libecho
|
||||||
|
[11]: https://github.com/pluie-org/docker-images/tree/master/pluie/libyaml
|
||||||
|
[12]: https://github.com/pluie-org/docker-images/tree/master/pluie/ubuntu
|
22
pluie/alpine-symfony/build
Executable file
22
pluie/alpine-symfony/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/files.tar
Normal file
BIN
pluie/alpine-symfony/files.tar
Normal file
Binary file not shown.
7
pluie/alpine-symfony/install.d/10-symfony.sh
Executable file
7
pluie/alpine-symfony/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 add php5-iconv php5-intl php5-posix
|
||||||
|
curl -LsS https://symfony.com/installer -o /usr/bin/symfony
|
||||||
|
chmod +x /usr/bin/symfony
|
15
pluie/alpine-symfony/pre-init.d/10-symfony.sh
Normal file
15
pluie/alpine-symfony/pre-init.d/10-symfony.sh
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine-symfony
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
if [ ! -z "$CREATE_WWW_DIR" ]; then
|
||||||
|
cd /tmp
|
||||||
|
symfony new app $SYMFONY_VERSION
|
||||||
|
rm -rf /app/web
|
||||||
|
mv -f app/* /app/
|
||||||
|
chown -R 1000:apache /app/
|
||||||
|
chmod -R 777 /app/var
|
||||||
|
chmod -R g+w /app
|
||||||
|
CTN_IP=$(ip route | cut -d ' ' -f3 | head -n1)
|
||||||
|
sed -i "/::1/s//::1', '$CTN_IP/" /app/web/app_dev.php
|
||||||
|
fi
|
|
@ -1,11 +1,20 @@
|
||||||
FROM gliderlabs/alpine:3.2
|
# @app pluie/alpine
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
FROM alpine:3.5
|
||||||
|
|
||||||
MAINTAINER a-Sansara https://github.com/a-sansara
|
MAINTAINER a-Sansara https://github.com/a-sansara
|
||||||
|
|
||||||
ADD files.tar /scripts
|
ADD files.tar /scripts
|
||||||
|
|
||||||
|
ENV TERM=xterm \
|
||||||
|
SHENV_CTX=LOCAL \
|
||||||
|
SHENV_NAME=Alpine \
|
||||||
|
SHENV_COLOR=97 \
|
||||||
|
TZ=Europe/Paris
|
||||||
|
|
||||||
|
VOLUME /app
|
||||||
|
|
||||||
RUN apk --update add bash && bash /scripts/install.sh
|
RUN apk --update add bash && bash /scripts/install.sh
|
||||||
|
|
||||||
ENV TERM=xterm SHENV_CTX=LOCAL SHENV_NAME=Alpine SHENV_COLOR=97
|
|
||||||
|
|
||||||
ENTRYPOINT ["/scripts/main.sh"]
|
ENTRYPOINT ["/scripts/main.sh"]
|
||||||
|
|
|
@ -1,18 +1,36 @@
|
||||||
# pluie/alpine
|
# pluie/alpine
|
||||||
|
|
||||||
|
- [index][1]
|
||||||
|
- [pluie/alpine][2] ( ~ 9 MB ) Alpine/3.5
|
||||||
|
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.25 Php/5.6.30
|
||||||
|
- [pluie/alpine-apache-fpm][7] ( ~ 51 MB ) Apache/2.4.25 Php/5.6.30 Fpm
|
||||||
|
- [pluie/alpine-symfony][6] ( ~ 83 MB ) Symfony2.8 or 3.2
|
||||||
|
- [pluie/alpine-apache-php7][8] ( ~ 45 MB ) Apache/2.4.25 Php/7.0.16
|
||||||
|
- [pluie/alpine-symfony-php7][9] ( ~ 77 MB ) Symfony2.8 or 3.2 Php/7.0.16
|
||||||
|
- [pluie/alpine-mysql][4] ( ~181 MB ) Mysql/5.6 ( MariaDB )
|
||||||
|
- [pluie/libecho][10] ( ~288 MB ) Vala 0.34.2 pluie-echo-0.2
|
||||||
|
- [pluie/ubuntu][12] ( ~141 MB ) Ubuntu 18.04
|
||||||
|
- [pluie/libyaml][11] ( ~538 MB ) Vala 0.40.4 pluie-yaml-0.4
|
||||||
|
- [docker tips][5]
|
||||||
|
|
||||||
This Image provide a Linux Alpine distribution with :
|
This Image provide a Linux Alpine distribution with :
|
||||||
- fully functionnal & colorized terminal
|
- fully functionnal & colorized terminal
|
||||||
- bash
|
- bash
|
||||||
- curl
|
- curl
|
||||||
- nano as editor
|
- nano as editor
|
||||||
|
|
||||||
Base image : [gliderlabs/alpine:3.2] (https://registry.hub.docker.com/u/gliderlabs/alpine/)
|
Base image : [alpine:3.5](https://hub.docker.com/_/alpine/)
|
||||||
|
|
||||||
This project come with a structure to facilitate further images (like pluie/alpine-apache & pluie/alpine-mysql)
|
This project come with a structure to facilitate further images (like pluie/alpine-apache & pluie/alpine-mysql)
|
||||||
|
|
||||||
|
__note :__ wget ssl issue
|
||||||
|
|
||||||
|
apk add ca-certificates wget && update-ca-certificates
|
||||||
|
|
||||||
|
|
||||||
## Image Size
|
## Image Size
|
||||||
|
|
||||||
- very small image < 10 MB
|
- very small image ~ 9 MB
|
||||||
|
|
||||||
|
|
||||||
## Image Usage
|
## Image Usage
|
||||||
|
@ -34,7 +52,7 @@ project/
|
||||||
|
|
|
|
||||||
|-- pre-init.d/ # deployed in /scripts on target container
|
|-- pre-init.d/ # deployed in /scripts on target container
|
||||||
| | # launch on docker container running process
|
| | # launch on docker container running process
|
||||||
| |-- 50-example.sh
|
| |-- 50-builder.sh
|
||||||
|
|
|
|
||||||
|-- build # build docker image : ./build [TAG]
|
|-- build # build docker image : ./build [TAG]
|
||||||
|-- common.sh # don't modify - sourced by main.sh to execute pre-init.d scripts first
|
|-- common.sh # don't modify - sourced by main.sh to execute pre-init.d scripts first
|
||||||
|
@ -44,13 +62,13 @@ project/
|
||||||
```
|
```
|
||||||
|
|
||||||
you can easily create your own images based on this structure.
|
you can easily create your own images based on this structure.
|
||||||
keep an eye to pluie/alpine-apache & pluie/alpine-mysql wich extend pluie/alpine
|
keep an eye to pluie/alpine-apache, pluie/alpine-apache-php7 & pluie/alpine-mysql wich extend pluie/alpine
|
||||||
|
|
||||||
|
|
||||||
## Extend pluie/alpine Image
|
## Extend pluie/alpine Image
|
||||||
|
|
||||||
RUN instructions are minimized
|
RUN instructions are minimized
|
||||||
on extended image you can only use :
|
on extended image you only need to use :
|
||||||
```
|
```
|
||||||
RUN bash /scripts/install.sh
|
RUN bash /scripts/install.sh
|
||||||
```
|
```
|
||||||
|
@ -72,12 +90,28 @@ MAINTAINER a-Sansara https://github.com/a-sansara
|
||||||
|
|
||||||
ADD files.tar /scripts
|
ADD files.tar /scripts
|
||||||
|
|
||||||
RUN bash /scripts/install.sh
|
ENV SHENV_NAME=Apache \
|
||||||
|
SHENV_COLOR=67 \
|
||||||
|
HTTP_SERVER_NAME=site.docker \
|
||||||
|
WWW_DIR=www \
|
||||||
|
WWW_INDEX=index.php \
|
||||||
|
FIX_OWNERSHIP=1 \
|
||||||
|
TZ=Europe/Paris
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
VOLUME /app
|
RUN bash /scripts/install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[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
|
||||||
|
[10]: https://github.com/pluie-org/docker-images/tree/master/pluie/libecho
|
||||||
|
[11]: https://github.com/pluie-org/docker-images/tree/master/pluie/libyaml
|
||||||
|
[12]: https://github.com/pluie-org/docker-images/tree/master/pluie/ubuntu
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
Ctitle="\033[1;38;5;15;1;48;5;30m"
|
Ctitle="\033[1;38;5;15;1;48;5;30m"
|
||||||
Citem="\033[1;38;5;36m"
|
Citem="\033[1;38;5;36m"
|
||||||
|
@ -13,7 +14,7 @@ DOCKBUILD=$(basename $DOCKDIR)
|
||||||
cd $DOCKDIR
|
cd $DOCKDIR
|
||||||
echo -e "\n ${Ctitle} Preparing files : ${Coff}${Citem}\n"
|
echo -e "\n ${Ctitle} Preparing files : ${Coff}${Citem}\n"
|
||||||
|
|
||||||
tar -cvf files.tar *.sh pre-init.d/ install.d/ | sed "s/^/${indent}* /"
|
tar -cvf files.tar *.sh pre-init.d/ install.d/ | sed "s/^/${indent}↠ /"
|
||||||
|
|
||||||
echo -e "\n ${Ctitle} Proceed Dockerfile build : ${Coff}\n
|
echo -e "\n ${Ctitle} Proceed Dockerfile build : ${Coff}\n
|
||||||
"
|
"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
. /scripts/util.sh
|
. /scripts/util.sh
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -1,3 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
apk --update add nano curl
|
apk --update add nano curl tzdata
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
if [ ! -f /root/.bash_ps1 ]; then
|
if [ ! -f /root/.bash_ps1 ]; then
|
||||||
cat <<EOF >> /root/.bashrc
|
cat <<EOF >> /root/.bashrc
|
||||||
|
|
16
pluie/alpine/install.d/20-inputrc.sh
Normal file
16
pluie/alpine/install.d/20-inputrc.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
#
|
||||||
|
# Keyboard shortcut : Ctrl+x followed by desired key
|
||||||
|
# refresh without bash logout : bind -f ~/.inputrc
|
||||||
|
|
||||||
|
cat <<EOF > /etc/inputrc
|
||||||
|
"\e[1;5C": forward-word # ctrl + right
|
||||||
|
"\e[1;5D": backward-word # ctrl + left
|
||||||
|
"\e[1~": beginning-of-line # home
|
||||||
|
"\e[3~": delete-char # delete
|
||||||
|
"\e[4~": end-of-line # end
|
||||||
|
"\e[5~": history-search-backward # page-up
|
||||||
|
"\e[6~": history-search-forward # page-down
|
||||||
|
EOF
|
18
pluie/alpine/install.d/30-tz.sh
Normal file
18
pluie/alpine/install.d/30-tz.sh
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
if [ ! -z "$TZ" ] && [ -f "/usr/share/zoneinfo/$TZ" ]; then
|
||||||
|
echo "$TZ" > /etc/TZ
|
||||||
|
cp "/usr/share/zoneinfo/$TZ" "/etc/localtime"
|
||||||
|
if [ ! "${TZ///*/}" = "$TZ" ]; then
|
||||||
|
mkdir -p "/usr/share/zoneinfo/${TZ///*/}"
|
||||||
|
fi
|
||||||
|
cp /etc/localtime "/usr/share/zoneinfo/$TZ"
|
||||||
|
echo -e "\033[1;38;5;203mTIMEZONE : $TZ"
|
||||||
|
date
|
||||||
|
echo -en "\033[m"
|
||||||
|
apk del tzdata
|
||||||
|
else
|
||||||
|
echo -e "\033[1;38;5;203mNO DEFINED TIMEZONE"
|
||||||
|
fi
|
|
@ -1,3 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
rm -f /var/cache/apk/*
|
rm -f /var/cache/apk/*
|
||||||
|
chown -R root:root /scripts/
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
. /scripts/util.sh
|
. /scripts/util.sh
|
||||||
preInit "/scripts/install.d"
|
preInit "/scripts/install.d"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
. /scripts/common.sh
|
. /scripts/common.sh
|
||||||
bash
|
bash
|
||||||
|
|
7
pluie/alpine/pre-init.d/30-tz.sh
Normal file
7
pluie/alpine/pre-init.d/30-tz.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$TZ" != "Europe/Paris" ]; then
|
||||||
|
apk -U add tzdata
|
||||||
|
. /scripts/install.d/30-tz.sh
|
||||||
|
. /scripts/install.d/40-fix.sh
|
||||||
|
fi
|
5
pluie/alpine/pre-init.d/50-builder.sh
Executable file
5
pluie/alpine/pre-init.d/50-builder.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
echo -e "\ncontainer builded by \033[1;38;5;209mpluie.org\033[m - \033[1;38;5;32mhttps://git.pluie.org/pluie/docker-images\033[m\n"
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# ls -la /scripts
|
|
||||||
chown -R root:root /scripts/
|
|
|
@ -1,31 +1,39 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# pluie/docker-images - a-Sansara (https://github.com/a-sansara)
|
# @app pluie/alpine
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
function bash_prompt() {
|
function bash_prompt() {
|
||||||
local Cenv="243"
|
local Cenvcode="243"
|
||||||
if [ "$SHENV_CTX" = "INT" ]; then
|
if [ "$SHENV_CTX" = "INT" ]; then
|
||||||
local Cenv="202"
|
local Cenvcode="202"
|
||||||
elif [ "$SHENV_CTX" = "PROD" ]; then
|
elif [ "$SHENV_CTX" = "PROD" ]; then
|
||||||
local Cenv="160"
|
local Cenvcode="160"
|
||||||
fi
|
fi
|
||||||
local Cdate="\033[1;33m"
|
local Cdate="\[\033[1;33m\]"
|
||||||
local Cctx="\033[1;48;5;243m"
|
local Cctx="\[\033[1;48;5;${Cenvcode}m\]"
|
||||||
local Cname="\033[1;48;5;${SHENV_COLOR}m"
|
local Cname="\[\033[1;48;5;${SHENV_COLOR}m\]"
|
||||||
local Cpath="\033[1;38;5;36m"
|
local Cpath="\[\033[1;38;5;36m\]"
|
||||||
local Cwhite="\033[1;38;5;15m"
|
local Cwhite="\[\033[1;38;5;15m\]"
|
||||||
local Chost="\033[1;38;5;15m"
|
local Chost="\[\033[1;38;5;15m\]"
|
||||||
local Csymbol="\033[1;38;5;15m"
|
local Csymbol="\[\033[1;38;5;15m\]"
|
||||||
local Cuser="\033[1;38;5;203m"
|
local Cuser="\[\033[1;38;5;203m\]"
|
||||||
local Coff="\033[m"
|
local Coff="\[\033[m\]"
|
||||||
|
export PS1="${Cdate}\t ${Cwhite}${Cctx} DOCKER ${SHENV_CTX} ${Cname} ${SHENV_NAME} ${Coff} ${Cuser}\u${Chost}@\h ${Cpath}\w ${Csymbol}\$ ${Coff}"
|
||||||
|
}
|
||||||
|
|
||||||
export PS1="\[${Cdate}\]\t \[${Cwhite}${Cctx}\] DOCKER ${SHENV_CTX} \[${Cname}\] ${SHENV_NAME} \[${Coff} ${Cuser}\]\u\[${Chost}\]@\h \[${Cpath}\]\w \[${Csymbol}\]\$ \[${Coff}\]"
|
function initTitle(){
|
||||||
|
local data=${1:-''}
|
||||||
|
if [ ! -z "$2" ]; then
|
||||||
|
data="$data\033[1;38;5;97m $2 "
|
||||||
|
fi
|
||||||
|
echo -e "\n\033[1;33m[[ \033[1;38;5;30m$data\033[1;33m]]\033[m"
|
||||||
}
|
}
|
||||||
|
|
||||||
function preInit(){
|
function preInit(){
|
||||||
for i in ls $1/*.sh
|
for i in ls $1/*.sh
|
||||||
do
|
do
|
||||||
if [ -e "${i}" ]; then
|
if [ -e "${i}" ]; then
|
||||||
echo "[[ Processing $i ]]"
|
initTitle "Processing" "$i"
|
||||||
. "${i}"
|
. "${i}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
10
pluie/build
Executable file
10
pluie/build
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app docker-images
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
TAG=${1:-''}
|
||||||
|
for project in `ls -d */`; do
|
||||||
|
cd "$DIR/$project"
|
||||||
|
./build "$tag"
|
||||||
|
done
|
14
pluie/libecho/Dockerfile
Normal file
14
pluie/libecho/Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# @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=libecho \
|
||||||
|
SHENV_COLOR=32 \
|
||||||
|
TZ=Europe/Paris
|
||||||
|
|
||||||
|
RUN bash /scripts/install.sh
|
47
pluie/libecho/README.md
Normal file
47
pluie/libecho/README.md
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# pluie/libecho
|
||||||
|
|
||||||
|
- [index][1]
|
||||||
|
- [pluie/alpine][2] ( ~ 9 MB ) Alpine/3.5
|
||||||
|
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.25 Php/5.6.30
|
||||||
|
- [pluie/alpine-apache-fpm][7] ( ~ 51 MB ) Apache/2.4.25 Php/5.6.30 Fpm
|
||||||
|
- [pluie/alpine-symfony][6] ( ~ 83 MB ) Symfony2.8 or 3.2
|
||||||
|
- [pluie/alpine-apache-php7][8] ( ~ 45 MB ) Apache/2.4.25 Php/7.0.16
|
||||||
|
- [pluie/alpine-symfony-php7][9] ( ~ 77 MB ) Symfony2.8 or 3.2 Php/7.0.16
|
||||||
|
- [pluie/alpine-mysql][4] ( ~181 MB ) Mysql/5.6 ( MariaDB )
|
||||||
|
- [pluie/libecho][10] ( ~288 MB ) Vala 0.34.2 pluie-echo-0.2
|
||||||
|
- [pluie/ubuntu][12] ( ~141 MB ) Ubuntu 18.04
|
||||||
|
- [pluie/libyaml][11] ( ~538 MB ) Vala 0.40.4 pluie-yaml-0.4
|
||||||
|
- [docker tips][5]
|
||||||
|
|
||||||
|
demo image demonstrating libpluie-echo, a small vala shared library managing tracing, display formatting and ansi-extended colors on stdout & stderror.
|
||||||
|
|
||||||
|
you can run a container with :
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run --rm -it pluie/libecho
|
||||||
|
```
|
||||||
|
|
||||||
|
## repository
|
||||||
|
|
||||||
|
https://github.com/pluie-org/libpluie-echo
|
||||||
|
|
||||||
|
## samples
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
[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
|
||||||
|
[10]: https://github.com/pluie-org/docker-images/tree/master/pluie/libecho
|
||||||
|
[11]: https://github.com/pluie-org/docker-images/tree/master/pluie/libyaml
|
||||||
|
[12]: https://github.com/pluie-org/docker-images/tree/master/pluie/ubuntu
|
22
pluie/libecho/build
Executable file
22
pluie/libecho/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
|
||||||
|
"
|
||||||
|
sudo docker build --force-rm -t ${DOCKREPO}/${DOCKBUILD}:${DOCKTAG} . | sed "s/^/${indent}/"
|
||||||
|
cd $TMPPWD
|
BIN
pluie/libecho/files.tar
Normal file
BIN
pluie/libecho/files.tar
Normal file
Binary file not shown.
10
pluie/libecho/install.d/10-vala.sh
Normal file
10
pluie/libecho/install.d/10-vala.sh
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/alpine-apache
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
apk add git vala gcc musl-dev python3 ninja \
|
||||||
|
&& pip3 install meson \
|
||||||
|
&& git clone https://github.com/pluie-org/libpluie-echo.git \
|
||||||
|
&& cd libpluie-echo/ \
|
||||||
|
&& meson --prefix=/usr ./ build \
|
||||||
|
&& ninja install -C build
|
8
pluie/libecho/main.sh
Executable file
8
pluie/libecho/main.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# @app pluie/libecho
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
. /scripts/common.sh
|
||||||
|
|
||||||
|
initTitle "Vala shared lib pluie-echo-0.2" "Sample"
|
||||||
|
/libpluie-echo/samples/pluie-outputFormatter
|
2
pluie/libecho/pre-init.d/10-vala.sh
Normal file
2
pluie/libecho/pre-init.d/10-vala.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
cd /libpluie-echo/samples
|
||||||
|
valac --pkg pluie-echo-0.2 pluie-outputFormatter.vala \
|
14
pluie/libyaml/Dockerfile
Normal file
14
pluie/libyaml/Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# @app pluie/libyaml
|
||||||
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
FROM pluie/ubuntu
|
||||||
|
|
||||||
|
MAINTAINER a-Sansara https://github.com/a-sansara
|
||||||
|
|
||||||
|
ADD files.tar /scripts
|
||||||
|
|
||||||
|
ENV SHENV_NAME=libyaml \
|
||||||
|
SHENV_COLOR=36 \
|
||||||
|
TZ=Europe/Paris
|
||||||
|
|
||||||
|
RUN /bin/bash /scripts/install.sh
|
63
pluie/libyaml/README.md
Normal file
63
pluie/libyaml/README.md
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
# pluie/libyaml
|
||||||
|
|
||||||
|
- [index][1]
|
||||||
|
- [pluie/alpine][2] ( ~ 9 MB ) Alpine/3.5
|
||||||
|
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.25 Php/5.6.30
|
||||||
|
- [pluie/alpine-apache-fpm][7] ( ~ 51 MB ) Apache/2.4.25 Php/5.6.30 Fpm
|
||||||
|
- [pluie/alpine-symfony][6] ( ~ 83 MB ) Symfony2.8 or 3.2
|
||||||
|
- [pluie/alpine-apache-php7][8] ( ~ 45 MB ) Apache/2.4.25 Php/7.0.16
|
||||||
|
- [pluie/alpine-symfony-php7][9] ( ~ 77 MB ) Symfony2.8 or 3.2 Php/7.0.16
|
||||||
|
- [pluie/alpine-mysql][4] ( ~181 MB ) Mysql/5.6 ( MariaDB )
|
||||||
|
- [pluie/libecho][10] ( ~288 MB ) Vala 0.34.2 pluie-echo-0.2
|
||||||
|
- [pluie/ubuntu][12] ( ~141 MB ) Ubuntu 18.04
|
||||||
|
- [pluie/libyaml][11] ( ~538 MB ) Vala 0.40.4 pluie-yaml-0.4
|
||||||
|
- [docker tips][5]
|
||||||
|
|
||||||
|
|
||||||
|
demo image demonstrating pluie-yaml, a shared vala library managing yaml files (v 1.2) and yaml nodes in vala language.
|
||||||
|
As json is now a valid subset of yaml, you can use this lib to load json files too
|
||||||
|
|
||||||
|
you can run a container with :
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run --rm -it pluie/libyaml
|
||||||
|
```
|
||||||
|
|
||||||
|
then execute any samples :
|
||||||
|
|
||||||
|
./yaml-loader
|
||||||
|
./json-loader
|
||||||
|
./yaml-config
|
||||||
|
./yaml-traversing
|
||||||
|
./yaml-finder
|
||||||
|
./yaml-imports
|
||||||
|
./yaml-node
|
||||||
|
|
||||||
|
## repository
|
||||||
|
|
||||||
|
https://github.com/pluie-org/lib-yaml
|
||||||
|
|
||||||
|
## samples
|
||||||
|
|
||||||
|
./yaml-config source code
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
./yaml-config output
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
[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
|
||||||
|
[10]: https://github.com/pluie-org/docker-images/tree/master/pluie/libecho
|
||||||
|
[11]: https://github.com/pluie-org/docker-images/tree/master/pluie/libyaml
|
||||||
|
[12]: https://github.com/pluie-org/docker-images/tree/master/pluie/ubuntu
|
22
pluie/libyaml/build
Executable file
22
pluie/libyaml/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
|
||||||
|
"
|
||||||
|
sudo docker build --force-rm -t ${DOCKREPO}/${DOCKBUILD}:${DOCKTAG} . | sed "s/^/${indent}/"
|
||||||
|
cd $TMPPWD
|
BIN
pluie/libyaml/files.tar
Normal file
BIN
pluie/libyaml/files.tar
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user