To show runit, socklog, svlogd in docker
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
Andrey Arapov 15ae5532fa
add missing volume
il y a 4 ans
service initial commit il y a 4 ans
Dockerfile add missing volume il y a 4 ans
README.md initial commit il y a 4 ans

README.md

show runit

This container is to show how one can use runit, svlogd and socklog in order to log the service activity.

$ docker run --rm -ti --name runit show-runit
/etc/service/showlog/run started
/etc/service/fakeapp3/log/run started
/etc/service/fakeapp2/log/run started
/etc/service/fakeapp1/log/run started
listening on /dev/log, gid=99, uid=99, starting.
2016-07-16_16:42:49.78418 [stdout] /etc/service/fakeapp1/fakeapp1.sh test: 1 ...
2016-07-16_16:42:51.77754 [stdout] /etc/service/fakeapp1/fakeapp1.sh test: 2 ...
2016-07-16_16:42:49.78307 [stdout] /etc/service/fakeapp2/fakeapp2.sh test: 1 ...
2016-07-16_16:42:49.78490 user.notice: Jul 16 16:42:49 /etc/service/fakeapp3/fakeapp3.sh: test: 1 ...
2016-07-16_16:42:51.78458 [stdout] /etc/service/fakeapp2/fakeapp2.sh test: 2 ...
2016-07-16_16:42:51.78676 user.notice: Jul 16 16:42:51 /etc/service/fakeapp3/fakeapp3.sh: test: 2 ...
2016-07-16_16:42:53.77904 [stdout] /etc/service/fakeapp1/fakeapp1.sh test: 3 ...
2016-07-16_16:42:53.78588 [stdout] /etc/service/fakeapp2/fakeapp2.sh test: 3 ...
2016-07-16_16:42:53.78935 user.notice: Jul 16 16:42:53 /etc/service/fakeapp3/fakeapp3.sh: test: 3 ...
2016-07-16_16:42:55.78062 [stdout] /etc/service/fakeapp1/fakeapp1.sh test: 4 ...
2016-07-16_16:42:55.78736 [stdout] /etc/service/fakeapp2/fakeapp2.sh test: 4 ...
2016-07-16_16:42:55.79176 user.notice: Jul 16 16:42:55 /etc/service/fakeapp3/fakeapp3.sh: test: 4 ...

Build

docker build --ulimit nofile=1024:2048 -t show-runit .

Use

docker run --rm -ti --name runit show-runit
docker run -d -ti --name runit show-runit
docker logs -f runit
docker stop runit
docker start runit
docker exec -ti runit bash
sv status /etc/service/*
sv stop /etc/service/fakeapp1
sv start /etc/service/fakeapp1
ls -la /var/log/fakeapp*