Compare commits

...

7 Commits
1.5 ... master

Author SHA1 Message Date
a-Sansara
09b2d8f1a0 update summary menu in all readme 2018-08-14 02:43:27 +02:00
a-Sansara
e946a39e7c add base ubuntu lts + update libyaml with base ubuntu 2018-08-14 02:21:22 +02:00
a-Sansara
2e5e401c85 adding vala shared lib pluie-yaml-0.4 2018-08-08 01:18:37 +02:00
a-Sansara
b525151f68 update libecho to version 0.2 2017-11-18 00:00:49 +01:00
a-Sansara
db06c5d107 update libecho README 2017-11-07 02:24:34 +01:00
a-Sansara
ffe9dc8cb0 adding vala shared lib libpluie-echo-0.1 2017-11-05 15:22:53 +01:00
a-sansara
43ca75bef6 fix TZ inheritance on install & init process 2017-07-05 21:20:53 +02:00
54 changed files with 575 additions and 7 deletions

View File

@ -8,6 +8,9 @@
- [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
@ -190,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

View File

@ -12,6 +12,9 @@ various based images for Docker
- [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

View File

@ -8,6 +8,9 @@
- [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
@ -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.

View File

@ -39,6 +39,7 @@ 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

View File

@ -9,9 +9,9 @@ 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
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

View 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"

View File

@ -8,6 +8,9 @@
- [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__
@ -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.

View 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"

View File

@ -8,6 +8,9 @@
- [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__
@ -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.

View File

@ -9,9 +9,9 @@ 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
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

View 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"

View File

@ -8,6 +8,9 @@
- [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__
@ -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.

View 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"

View File

@ -8,6 +8,9 @@
- [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)
@ -138,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.

View File

@ -8,6 +8,9 @@
- [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.
@ -80,3 +83,6 @@ $ docker exec -it symfony php /app/bin/console --ansi
[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.

View File

@ -8,6 +8,9 @@
- [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.
@ -76,3 +79,6 @@ $ docker exec -it symfony php /app/bin/console --ansi
[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.

View File

@ -8,6 +8,9 @@
- [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 :
@ -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.

View File

@ -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

View 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
View 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
View 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
![Sample 1 code](https://www.meta-tech.academy/img/libpluie-echo_sample_code1.png?tmp=1)
![Sample 1 output](https://www.meta-tech.academy/img/libpluie-echo_sample1.png)
![Sample 2 code](https://www.meta-tech.academy/img/libpluie-echo_sample_code2.png?tmp=1)
![Sample 2 output](https://www.meta-tech.academy/img/libpluie-echo_sample2.png)
[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
View 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

Binary file not shown.

View 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
View 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

View File

@ -0,0 +1,2 @@
cd /libpluie-echo/samples
valac --pkg pluie-echo-0.2 pluie-outputFormatter.vala \

14
pluie/libyaml/Dockerfile Normal file
View 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
View 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
![Sample yaml-config code](https://www.meta-tech.academy/img/lib-yaml-config-code.png?tmp=1)
./yaml-config output
![Sample yaml-config output1](https://www.meta-tech.academy/img/lib-yaml-docker-config1.png?tmp=1)
![Sample yaml-config output2](https://www.meta-tech.academy/img/lib-yaml-docker-config2.png?tmp=1)
[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
View 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

Binary file not shown.

View 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
View 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

View 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
View 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
View 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
View 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
View 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

Binary file not shown.

View File

@ -0,0 +1,4 @@
export DEBCONF_NONINTERACTIVE_SEEN=true
export DEBIAN_FRONTEND=noninteractive
apt update
apt install -y nano curl tzdata

View 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

View 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

View 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
View 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
View File

@ -0,0 +1,6 @@
#!/bin/bash
# @app pluie/alpine
# @author a-Sansara https://git.pluie.org/pluie/docker-images
. /scripts/common.sh
bash

View 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
View 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
}