diff --git a/pluie/libecho/Dockerfile b/pluie/libecho/Dockerfile new file mode 100644 index 0000000..62704f5 --- /dev/null +++ b/pluie/libecho/Dockerfile @@ -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 diff --git a/pluie/libecho/README.md b/pluie/libecho/README.md new file mode 100644 index 0000000..b76fa1d --- /dev/null +++ b/pluie/libecho/README.md @@ -0,0 +1,20 @@ +# libpluie-echo + +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) +![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) +![Sample 2 output](https://www.meta-tech.academy/img/libpluie-echo_sample2.png) diff --git a/pluie/libecho/build b/pluie/libecho/build new file mode 100755 index 0000000..8cafaab --- /dev/null +++ b/pluie/libecho/build @@ -0,0 +1,22 @@ +#!/bin/bash +# @app pluie/alpine-apache +# @author a-Sansara https://git.pluie.org/pluie/docker-images + + Ctitle="\033[1;38;5;15;1;48;5;30m" + Citem="\033[1;38;5;36m" + Coff="\033[m" + DOCKDIR=$(dirname "$(readlink -f ${BASH_SOURCE[0]})") +DOCKBUILD=$(basename $DOCKDIR) + DOCKREPO=$(basename $(dirname $DOCKDIR)) + DOCKTAG=${1:-"latest"} + TMPPWD=$(pwd) + indent=" " +cd $DOCKDIR +echo -e "\n ${Ctitle} Preparing files : ${Coff}${Citem}\n" + +tar -cvf files.tar *.sh pre-init.d/ install.d/ | sed "s/^/${indent}↠ /" + +echo -e "\n ${Ctitle} Proceed Dockerfile build : ${Coff}\n +" +sudo docker build --force-rm -t ${DOCKREPO}/${DOCKBUILD}:${DOCKTAG} . | sed "s/^/${indent}/" +cd $TMPPWD diff --git a/pluie/libecho/files.tar b/pluie/libecho/files.tar new file mode 100644 index 0000000..0599354 Binary files /dev/null and b/pluie/libecho/files.tar differ diff --git a/pluie/libecho/install.d/10-vala.sh b/pluie/libecho/install.d/10-vala.sh new file mode 100644 index 0000000..6329f5b --- /dev/null +++ b/pluie/libecho/install.d/10-vala.sh @@ -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 \ diff --git a/pluie/libecho/main.sh b/pluie/libecho/main.sh new file mode 100755 index 0000000..f4685f6 --- /dev/null +++ b/pluie/libecho/main.sh @@ -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.1" "Sample" +/libpluie-echo/echo diff --git a/pluie/libecho/pre-init.d/10-vala.sh b/pluie/libecho/pre-init.d/10-vala.sh new file mode 100644 index 0000000..9735c25 --- /dev/null +++ b/pluie/libecho/pre-init.d/10-vala.sh @@ -0,0 +1,2 @@ +cd /libpluie-echo +valac --pkg pluie-echo-0.1 main.vala -o echo \