Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
09b2d8f1a0 | ||
|
e946a39e7c | ||
|
2e5e401c85 | ||
|
b525151f68 | ||
|
db06c5d107 | ||
|
ffe9dc8cb0 | ||
|
43ca75bef6 | ||
|
32093e01d6 | ||
|
232ea7a8da | ||
|
28533f0cce | ||
|
9cabf4d736 | ||
|
3951d9deb1 | ||
|
17163c9b3d |
58
DOCKER.md
58
DOCKER.md
|
@ -1,13 +1,16 @@
|
|||
## Docker
|
||||
|
||||
- [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/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
|
||||
|
@ -36,6 +39,7 @@ docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}
|
|||
172.22.0.6 wordpress.docker
|
||||
172.22.0.7 fpm.docker
|
||||
172.22.0.8 symfony.docker
|
||||
172.22.0.9 php7.docker
|
||||
# <
|
||||
|
||||
```
|
||||
|
@ -74,13 +78,13 @@ docker stats 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)
|
||||
[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
|
||||
```
|
||||
|
@ -124,6 +128,18 @@ docker run --name apache --restart=always \
|
|||
-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
|
||||
|
@ -155,6 +171,17 @@ docker run --name symfony --restart=always \
|
|||
-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
|
||||
|
@ -166,3 +193,6 @@ docker run --name symfony --restart=always \
|
|||
[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
|
||||
|
|
20
README.md
20
README.md
|
@ -5,13 +5,16 @@ various based images for Docker
|
|||
## Available Images
|
||||
|
||||
- [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/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]
|
||||
|
||||
## Base Image Structure
|
||||
|
@ -83,3 +86,6 @@ you can keep same __build__ script in any project
|
|||
[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,23 +1,26 @@
|
|||
# pluie/alpine-apache
|
||||
|
||||
- [index][1]
|
||||
- [pluie/alpine][2] ( < 10 MB ) Alpine/3.4
|
||||
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24
|
||||
- [pluie/alpine-apache-fpm][7] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 Fpm
|
||||
- [pluie/alpine-symfony][6] ( ~ 82 MB ) Symfony2.8 or 3.1
|
||||
- [pluie/alpine-apache-php7][8] ( ~ 50 MB ) Apache/2.4.25 Php/7.0.15
|
||||
- [pluie/alpine-symfony-php7][9] ( ~ 82 MB ) Symfony2.8 or 3.2 Php/7.0.15
|
||||
- [pluie/alpine-mysql][4] ( ~172 MB ) Mysql/5.5.47 ( MariaDB )
|
||||
- [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.23__ and __php 5.6.24__ with FPM
|
||||
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 ~ 50 MB
|
||||
- image ~ 51 MB
|
||||
|
||||
## ENV variables
|
||||
|
||||
|
@ -98,3 +101,6 @@ $ docker exec -it afpm "httpd -h"
|
|||
[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
|
||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
|||
# @app pluie/alpine-apache
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
apk --update add apache2 apache2-proxy apache2-proxy-html apache-mod-fcgid libxml2 \
|
||||
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
|
||||
|
|
|
@ -20,19 +20,12 @@ function a2setModule(){
|
|||
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"
|
||||
|
@ -46,7 +39,8 @@ 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
|
||||
sed -i "s|;*cgi.fix_pathinfo=.*|cgi.fix_pathinfo= 0|i" /etc/php5/php.ini
|
||||
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
|
||||
|
|
|
@ -2,6 +2,17 @@
|
|||
# @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
|
||||
|
|
|
@ -6,7 +6,7 @@ if [ ! -z "/app/vhost" ]; then
|
|||
cat <<EOF > "/app/vhost"
|
||||
<VirtualHost *:80>
|
||||
ServerName $HTTP_SERVER_NAME
|
||||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
|
||||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=\$1
|
||||
<FilesMatch \.php$>
|
||||
SetHandler proxy:fcgi://127.0.0.1:9000
|
||||
</FilesMatch>
|
||||
|
|
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"
|
|
@ -1,16 +1,19 @@
|
|||
# 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/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.15__
|
||||
Extend pluie/alpine with __apache 2.4.25__ and __php 7.0.16__
|
||||
|
||||
- error log are attached to stdout
|
||||
- no need port redirection
|
||||
|
@ -20,7 +23,7 @@ Extend pluie/alpine with __apache 2.4.25__ and __php 7.0.15__
|
|||
|
||||
## Image Size
|
||||
|
||||
- image ~ 50 MB
|
||||
- image ~ 45 MB
|
||||
|
||||
## ENV variables
|
||||
|
||||
|
@ -94,3 +97,6 @@ $ docker exec -it php7 "httpd -h"
|
|||
[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
|
||||
|
|
Binary file not shown.
|
@ -2,7 +2,14 @@
|
|||
# @app pluie/alpine-apache-php7
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community
|
||||
http://dl-cdn.alpinelinux.org/alpine/edge/main
|
||||
http://dl-cdn.alpinelinux.org/alpine/edge/testing
|
||||
" > /etc/apk/repositories
|
||||
#~ 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
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# @app pluie/alpine-apache
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
apk --update add apache2 apache2-proxy \
|
||||
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 \
|
||||
php7-gd php7-mcrypt php7-openssl php7-dom \
|
||||
# php-pdo_odbc php-soap php-pgsql
|
||||
|
|
|
@ -22,21 +22,14 @@ fi
|
|||
if [ ! -f /usr/lib/libxml2.so ]; then
|
||||
ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so
|
||||
fi
|
||||
if [ ! -d /app/$WWW_DIR ]; then
|
||||
mkdir -p /app/$WWW_DIR
|
||||
fi
|
||||
|
||||
if [ ! -d /run/apache2 ]; then
|
||||
mkdir /run/apache2
|
||||
fi
|
||||
chown -R 1000:apache /app/$WWW_DIR
|
||||
chmod -R 755 /scripts/pre-init.d
|
||||
mkdir -p /run/apache2
|
||||
chown apache:apache /run/apache2
|
||||
|
||||
tmpsed='s#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g'
|
||||
sed -i "$tmpsed" /etc/apache2/httpd.conf
|
||||
sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf
|
||||
|
||||
initTitle "Apache" "Loading Modules"
|
||||
a2setModule 1 "rewrite"
|
||||
a2setModule 1 "mpm_prefork"
|
||||
|
|
|
@ -2,6 +2,18 @@
|
|||
# @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
|
||||
|
|
|
@ -6,7 +6,7 @@ if [ ! -z "/app/vhost" ]; then
|
|||
cat <<EOF > "/app/vhost"
|
||||
<VirtualHost *:80>
|
||||
ServerName $HTTP_SERVER_NAME
|
||||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
|
||||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=\$1
|
||||
<Directory /app/$WWW_DIR>
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
|
|
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,16 +1,19 @@
|
|||
# pluie/alpine-apache
|
||||
|
||||
- [index][1]
|
||||
- [pluie/alpine][2] ( < 10 MB ) Alpine/3.4
|
||||
- [pluie/alpine-apache][3] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24
|
||||
- [pluie/alpine-apache-fpm][7] ( ~ 50 MB ) Apache/2.4.23 Php/5.6.24 Fpm
|
||||
- [pluie/alpine-symfony][6] ( ~ 82 MB ) Symfony2.8 or 3.1
|
||||
- [pluie/alpine-apache-php7][8] ( ~ 50 MB ) Apache/2.4.25 Php/7.0.15
|
||||
- [pluie/alpine-symfony-php7][9] ( ~ 82 MB ) Symfony2.8 or 3.2 Php/7.0.15
|
||||
- [pluie/alpine-mysql][4] ( ~172 MB ) Mysql/5.5.47 ( MariaDB )
|
||||
- [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.23__ and __php 5.6.24__
|
||||
Extend pluie/alpine with __apache 2.4.25__ and __php 5.6.30__
|
||||
|
||||
- error log are attached to stdout
|
||||
- no need port redirection
|
||||
|
@ -94,3 +97,6 @@ $ docker exec -it apache "httpd -h"
|
|||
[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
|
||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
|||
# @app pluie/alpine-apache
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
apk --update add apache2 apache2-proxy \
|
||||
apk add apache2 apache2-proxy \
|
||||
php5-apache2 php5-cli php5-phar php5-zlib php5-zip php5-ctype php5-mysqli php5-xml php5-pdo_mysql \
|
||||
php5-opcache php5-pdo php5-json php5-curl php5-gd php5-mcrypt php5-openssl php5-dom \
|
||||
# php-pdo_odbc php-soap php-pgsql
|
||||
|
|
|
@ -19,21 +19,14 @@ function a2setModule(){
|
|||
if [ ! -f /usr/lib/libxml2.so ]; then
|
||||
ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so
|
||||
fi
|
||||
if [ ! -d /app/$WWW_DIR ]; then
|
||||
mkdir -p /app/$WWW_DIR
|
||||
fi
|
||||
if [ ! -d /run/apache2 ]; then
|
||||
mkdir /run/apache2
|
||||
fi
|
||||
chown -R 1000:apache /app/$WWW_DIR
|
||||
|
||||
chmod -R 755 /scripts/pre-init.d
|
||||
mkdir -p /run/apache2
|
||||
chown apache:apache /run/apache2
|
||||
|
||||
tmpsed='s#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g'
|
||||
sed -i "$tmpsed" /etc/apache2/httpd.conf
|
||||
sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf
|
||||
|
||||
initTitle "Apache" "Loading Modules"
|
||||
a2setModule 1 "rewrite"
|
||||
a2setModule 1 "mpm_prefork"
|
||||
|
|
|
@ -2,6 +2,17 @@
|
|||
# @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
|
||||
|
|
|
@ -6,7 +6,7 @@ if [ ! -z "/app/vhost" ]; then
|
|||
cat <<EOF > "/app/vhost"
|
||||
<VirtualHost *:80>
|
||||
ServerName $HTTP_SERVER_NAME
|
||||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
|
||||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=\$1
|
||||
<Directory /app/$WWW_DIR>
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
|
|
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"
|
|
@ -1,16 +1,19 @@
|
|||
# pluie/alpine-mysql
|
||||
|
||||
- [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/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.14)
|
||||
Extend pluie/alpine with mysql (MariaDb/10.1.22)
|
||||
Project comes with various scripts to execute basic tasks such as :
|
||||
- dbcreate
|
||||
- dbdump
|
||||
|
@ -21,7 +24,7 @@ Root access to database is only permit on localhost
|
|||
|
||||
## Image Size
|
||||
|
||||
- image ~ 172 MB
|
||||
- image ~ 181 MB
|
||||
|
||||
## Image Volumes
|
||||
|
||||
|
@ -69,8 +72,9 @@ for example :
|
|||
$ docker run --name pma -p 8080:80 --link mysql:db -d phpmyadmin/phpmyadmin
|
||||
```
|
||||
|
||||
and phpmyadmin is accessible via http://localhost:8080/ and linked to your mysql container
|
||||
|
||||
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)
|
||||
|
||||
### Existing Scripts
|
||||
|
||||
|
@ -106,7 +110,7 @@ $ docker exec -it mysql "mysql -udev -pmysql"
|
|||
|
||||
to connect to the mysql server as root :
|
||||
```
|
||||
$ docker exec -it mysql "mysql -uroot"
|
||||
$ docker exec -it mysql mysql
|
||||
```
|
||||
to connect to the mysql container as root :
|
||||
```
|
||||
|
@ -137,3 +141,6 @@ docker run --name mycontainer --link mysql:db ...
|
|||
[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
|
||||
|
|
Binary file not shown.
|
@ -2,4 +2,4 @@
|
|||
# @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,13 +1,16 @@
|
|||
# pluie/alpine-symfony-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/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.
|
||||
|
@ -17,7 +20,7 @@ the symfony framework with $SYMFONY_VERSION version on the /app directory
|
|||
|
||||
## Image Size
|
||||
|
||||
- image ~ 82 MB
|
||||
- image ~ 77 MB
|
||||
|
||||
## ENV variables
|
||||
|
||||
|
@ -65,6 +68,11 @@ $ docker run --name symfony -d --link=mysql:db -e HTTP_SERVER_NAME=yourServerNam
|
|||
$ 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
|
||||
|
@ -75,3 +83,6 @@ $ docker exec -it symfony bash
|
|||
[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
|
||||
|
|
Binary file not shown.
|
@ -2,6 +2,6 @@
|
|||
# @app pluie/alpine-symfony
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
apk -U add php7-iconv php7-intl php7-posix
|
||||
apk add php7-iconv php7-intl php7-posix
|
||||
curl -LsS https://symfony.com/installer -o /usr/bin/symfony
|
||||
chmod +x /usr/bin/symfony
|
||||
|
|
|
@ -2,12 +2,14 @@
|
|||
# @app pluie/alpine-symfony
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
if [ ! -d /app/$WWW_DIR ]; then
|
||||
if [ ! -z "$CREATE_WWW_DIR" ]; then
|
||||
cd /tmp
|
||||
mkdir $WWW_DIR
|
||||
symfony new app $SYMFONY_VERSION
|
||||
mv app/* /app/
|
||||
rm -rf /app/web
|
||||
mv -f app/* /app/
|
||||
chown -R 1000:apache /app/
|
||||
chown -R 1000:apache /app/var
|
||||
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
|
||||
|
|
|
@ -1,23 +1,26 @@
|
|||
# pluie/alpine-symfony
|
||||
|
||||
- [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/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
|
||||
the symfony framework with `$SYMFONY_VERSION` version on the `/app` directory
|
||||
|
||||
## Image Size
|
||||
|
||||
- image ~ 82 MB
|
||||
- image ~ 83 MB
|
||||
|
||||
## ENV variables
|
||||
|
||||
|
@ -59,6 +62,12 @@ $ docker run --name symfony -d --link=mysql:db -e HTTP_SERVER_NAME=yourServerNam
|
|||
|
||||
```
|
||||
$ 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
|
||||
|
@ -70,3 +79,6 @@ $ docker exec -it symfony bash
|
|||
[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
|
||||
|
|
Binary file not shown.
|
@ -2,6 +2,6 @@
|
|||
# @app pluie/alpine-symfony
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
apk -U add php5-iconv php5-intl php5-posix
|
||||
apk add php5-iconv php5-intl php5-posix
|
||||
curl -LsS https://symfony.com/installer -o /usr/bin/symfony
|
||||
chmod +x /usr/bin/symfony
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
# @app pluie/alpine-symfony
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
if [ ! -d /app/$WWW_DIR ]; then
|
||||
if [ ! -z "$CREATE_WWW_DIR" ]; then
|
||||
cd /tmp
|
||||
ls -la /tmp
|
||||
mkdir $WWW_DIR
|
||||
symfony new app $SYMFONY_VERSION
|
||||
mv app/* /app/
|
||||
rm -rf /app/web
|
||||
mv -f app/* /app/
|
||||
chown -R 1000:apache /app/
|
||||
mkdir -p /app/var/logs
|
||||
chown -R 1000:apache /app/var
|
||||
chmod -R g+w /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,7 +1,7 @@
|
|||
# @app pluie/alpine
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
FROM alpine:3.4
|
||||
FROM alpine:3.5
|
||||
|
||||
MAINTAINER a-Sansara https://github.com/a-sansara
|
||||
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
# pluie/alpine
|
||||
|
||||
- [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.2
|
||||
- [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/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 :
|
||||
|
@ -16,7 +19,7 @@ This Image provide a Linux Alpine distribution with :
|
|||
- curl
|
||||
- nano as editor
|
||||
|
||||
Base image : [alpine:3.4] (https://hub.docker.com/_/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)
|
||||
|
||||
|
@ -27,7 +30,7 @@ apk add ca-certificates wget && update-ca-certificates
|
|||
|
||||
## Image Size
|
||||
|
||||
- very small image < 10 MB
|
||||
- very small image ~ 9 MB
|
||||
|
||||
|
||||
## Image Usage
|
||||
|
@ -59,13 +62,13 @@ project/
|
|||
```
|
||||
|
||||
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
|
||||
|
||||
RUN instructions are minimized
|
||||
on extended image you can only use :
|
||||
on extended image you only need to use :
|
||||
```
|
||||
RUN bash /scripts/install.sh
|
||||
```
|
||||
|
@ -93,7 +96,7 @@ ENV SHENV_NAME=Apache \
|
|||
WWW_DIR=www \
|
||||
WWW_INDEX=index.php \
|
||||
FIX_OWNERSHIP=1 \
|
||||
TZ=Europe/Paris
|
||||
TZ=Europe/Paris
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
@ -109,3 +112,6 @@ RUN bash /scripts/install.sh
|
|||
[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
|
||||
|
|
Binary file not shown.
|
@ -5,7 +5,6 @@
|
|||
if [ ! -z "$TZ" ] && [ -f "/usr/share/zoneinfo/$TZ" ]; then
|
||||
echo "$TZ" > /etc/TZ
|
||||
cp "/usr/share/zoneinfo/$TZ" "/etc/localtime"
|
||||
apk del tzdata
|
||||
if [ ! "${TZ///*/}" = "$TZ" ]; then
|
||||
mkdir -p "/usr/share/zoneinfo/${TZ///*/}"
|
||||
fi
|
||||
|
@ -13,6 +12,7 @@ if [ ! -z "$TZ" ] && [ -f "/usr/share/zoneinfo/$TZ" ]; then
|
|||
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
|
||||
|
|
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
|
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.
14
pluie/libyaml/install.d/20-vala.sh
Normal file
14
pluie/libyaml/install.d/20-vala.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
# @app pluie/libyaml
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
export DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
echo "Updating system..."
|
||||
apt install -y glib-2.0-dev libgee-0.8-dev libyaml-dev git gcc valac meson
|
||||
mkdir /home/repo; cd $_;
|
||||
echo "Installing pluie-echo dependency"
|
||||
git clone https://git.pluie.org/pluie/libpluie-echo.git
|
||||
cd libpluie-echo
|
||||
meson --prefix=/usr ./ build
|
||||
ninja install -C build
|
||||
pkg-config --libs pluie-echo-0.2
|
10
pluie/libyaml/main.sh
Executable file
10
pluie/libyaml/main.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
# @app pluie/libyaml
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
. /scripts/common.sh
|
||||
|
||||
cd /home/repo/lib-yaml
|
||||
echo "try any samples"
|
||||
bash
|
||||
|
4
pluie/libyaml/pre-init.d/50-builder.sh
Normal file
4
pluie/libyaml/pre-init.d/50-builder.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
cd /home/repo
|
||||
git clone https://git.pluie.org/pluie/lib-yaml.git
|
||||
cd lib-yaml
|
||||
./build.sh
|
20
pluie/ubuntu/Dockerfile
Normal file
20
pluie/ubuntu/Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# @app pluie/libyaml
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
FROM ubuntu:latest
|
||||
|
||||
MAINTAINER a-Sansara https://github.com/a-sansara
|
||||
|
||||
ADD files.tar /scripts
|
||||
|
||||
ENV TERM=xterm \
|
||||
SHENV_NAME=ubuntu \
|
||||
SHENV_COLOR=97 \
|
||||
SHENV_CTX=LOCAL \
|
||||
TZ=Europe/Paris
|
||||
|
||||
VOLUME /app
|
||||
|
||||
RUN /bin/bash /scripts/install.sh
|
||||
|
||||
ENTRYPOINT ["/scripts/main.sh"]
|
105
pluie/ubuntu/README.md
Normal file
105
pluie/ubuntu/README.md
Normal file
|
@ -0,0 +1,105 @@
|
|||
# pluie/ubuntu
|
||||
|
||||
- [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 Ubuntu LTS distribution base image.
|
||||
|
||||
Base image : [ubuntu](https://hub.docker.com/_/ubuntu/)
|
||||
|
||||
This project come with a structure to facilitate further images (like pluie/libyaml)
|
||||
|
||||
## Image Size
|
||||
|
||||
- 141 MB
|
||||
|
||||
|
||||
## Image Usage
|
||||
|
||||
```
|
||||
$ docker run --name ubuntu -it pluie/ubuntu
|
||||
```
|
||||
|
||||
## Image Structure
|
||||
|
||||
```
|
||||
project/
|
||||
|
|
||||
|-- install.d/ # deployed in /scripts on target container
|
||||
| | # launch on docker image building process
|
||||
| | # XX-name.sh - low XX are run first
|
||||
| |-- 00-util.sh
|
||||
| |-- 40-fix.sh
|
||||
|
|
||||
|-- pre-init.d/ # deployed in /scripts on target container
|
||||
| | # launch on docker container running process
|
||||
| |-- 50-builder.sh
|
||||
|
|
||||
|-- build # build docker image : ./build [TAG]
|
||||
|-- common.sh # don't modify - sourced by main.sh to execute pre-init.d scripts first
|
||||
|-- install.sh # don't modify - execute install.d scripts on docker building process
|
||||
|-- main.sh # source common.sh then execute entry point instruction
|
||||
|-- util.sh # sourced by common.sh
|
||||
```
|
||||
|
||||
you can easily create your own images based on this structure.
|
||||
keep an eye to pluie/libyalm wich extend pluie/ubuntu
|
||||
|
||||
|
||||
## Extend pluie/ubuntu Image
|
||||
|
||||
RUN instructions are minimized
|
||||
on extended image you only need to use :
|
||||
```
|
||||
RUN bash /scripts/install.sh
|
||||
```
|
||||
add your packages in a script in install.d directory
|
||||
keep name below 40 because install.d/40-fix.sh clean package repository
|
||||
each extended image inherit install.d && pre-init.d scripts
|
||||
|
||||
extended images doesn't need to define ENTRYPOINT
|
||||
you can keep intact build script in each extended project
|
||||
manage your install & init instruction in install.d & pre-init.d directory
|
||||
and write your own main.sh script
|
||||
|
||||
Docker file example (from pluie/libyaml)
|
||||
|
||||
```
|
||||
# @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 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
|
22
pluie/ubuntu/build
Executable file
22
pluie/ubuntu/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
|
10
pluie/ubuntu/common.sh
Normal file
10
pluie/ubuntu/common.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
# @app pluie/ubuntu
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
. /scripts/util.sh
|
||||
|
||||
# execute any pre-init scripts wich is useful for images based on this image
|
||||
# /scripts/pre-init.d/XX-name.sh
|
||||
# low XX are run first
|
||||
preInit "/scripts/pre-init.d"
|
BIN
pluie/ubuntu/files.tar
Normal file
BIN
pluie/ubuntu/files.tar
Normal file
Binary file not shown.
4
pluie/ubuntu/install.d/00-util.sh
Normal file
4
pluie/ubuntu/install.d/00-util.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
export DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt update
|
||||
apt install -y nano curl tzdata
|
13
pluie/ubuntu/install.d/10-ps1.sh
Normal file
13
pluie/ubuntu/install.d/10-ps1.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
# @app pluie/alpine
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
if [ ! -f /root/.bash_ps1 ]; then
|
||||
cat <<EOF >> /root/.bashrc
|
||||
if [ -f ~/.bash_ps1 ]; then
|
||||
. ~/.bash_ps1
|
||||
fi
|
||||
EOF
|
||||
sed -n '1,22 p' /scripts/util.sh > /root/.bash_ps1
|
||||
echo "bash_prompt" >> /root/.bash_ps1
|
||||
fi
|
17
pluie/ubuntu/install.d/30-ts.sh
Normal file
17
pluie/ubuntu/install.d/30-ts.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/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"
|
||||
else
|
||||
echo -e "\033[1;38;5;203mNO DEFINED TIMEZONE"
|
||||
fi
|
6
pluie/ubuntu/install.d/40-fix.sh
Normal file
6
pluie/ubuntu/install.d/40-fix.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
# @app pluie/alpine
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
apt clean
|
||||
chown -R root:root /scripts/
|
6
pluie/ubuntu/install.sh
Normal file
6
pluie/ubuntu/install.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
# @app pluie/ubuntu
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
. /scripts/util.sh
|
||||
preInit "/scripts/install.d"
|
6
pluie/ubuntu/main.sh
Executable file
6
pluie/ubuntu/main.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
# @app pluie/alpine
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
. /scripts/common.sh
|
||||
bash
|
5
pluie/ubuntu/pre-init.d/50-builder.sh
Normal file
5
pluie/ubuntu/pre-init.d/50-builder.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
# @app pluie/ubuntu
|
||||
# @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"
|
40
pluie/ubuntu/util.sh
Normal file
40
pluie/ubuntu/util.sh
Normal file
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
# @app pluie/alpine
|
||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||
|
||||
function bash_prompt() {
|
||||
local Cenvcode="243"
|
||||
if [ "$SHENV_CTX" = "INT" ]; then
|
||||
local Cenvcode="202"
|
||||
elif [ "$SHENV_CTX" = "PROD" ]; then
|
||||
local Cenvcode="160"
|
||||
fi
|
||||
local Cdate="\[\033[1;33m\]"
|
||||
local Cctx="\[\033[1;48;5;${Cenvcode}m\]"
|
||||
local Cname="\[\033[1;48;5;${SHENV_COLOR}m\]"
|
||||
local Cpath="\[\033[1;38;5;36m\]"
|
||||
local Cwhite="\[\033[1;38;5;15m\]"
|
||||
local Chost="\[\033[1;38;5;15m\]"
|
||||
local Csymbol="\[\033[1;38;5;15m\]"
|
||||
local Cuser="\[\033[1;38;5;203m\]"
|
||||
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}"
|
||||
}
|
||||
|
||||
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(){
|
||||
for i in ls $1/*.sh
|
||||
do
|
||||
if [ -e "${i}" ]; then
|
||||
initTitle "Processing" "$i"
|
||||
. "${i}"
|
||||
fi
|
||||
done
|
||||
}
|
Loading…
Reference in New Issue
Block a user