first commit
This commit is contained in:
commit
1df811cc62
11
Dockerfile
Normal file
11
Dockerfile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM alpine:3.8
|
||||||
|
MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
|
||||||
|
|
||||||
|
RUN apk update && \
|
||||||
|
apk upgrade && \
|
||||||
|
apk add dovecot runit socklog && \
|
||||||
|
rm -rf /etc/service
|
||||||
|
|
||||||
|
COPY service /etc/service/
|
||||||
|
# RUN find /etc/service -xdev -type f -name "run" -exec chmod +x '{}' \;
|
||||||
|
ENTRYPOINT runsvdir -P /etc/service
|
4
service/dovecot/finish
Executable file
4
service/dovecot/finish
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "${PWD##*/}: Exitted with $1 (signal: $2)"
|
||||||
|
[ $1 -ne 0 ] && ( echo "${PWD##*/}: rc != 0, sleeping for 5 seconds ..."; sleep 5 )
|
8
service/dovecot/run
Executable file
8
service/dovecot/run
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec 2>&1
|
||||||
|
|
||||||
|
echo "${PWD##*/}: started."
|
||||||
|
|
||||||
|
set -x
|
||||||
|
chown -Rh dovecot:dovecot -- /etc/dovecot
|
||||||
|
exec /usr/sbin/dovecot -F
|
4
service/logger/finish
Executable file
4
service/logger/finish
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "${PWD##*/}: Exitted with $1 (signal: $2)"
|
||||||
|
[ $1 -ne 0 ] && ( echo "${PWD##*/}: rc != 0, sleeping for 5 seconds ..."; sleep 5 )
|
10
service/logger/run
Executable file
10
service/logger/run
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Collect all logs which come to /dev/log
|
||||||
|
exec 2>&1
|
||||||
|
|
||||||
|
echo "${PWD##*/}: started."
|
||||||
|
|
||||||
|
set -x
|
||||||
|
exec chpst -Unobody socklog unix /dev/log
|
||||||
|
# exec socklog unix /dev/log
|
||||||
|
# exec socat UNIX-LISTEN:/dev/log,reuseaddr,fork -
|
Loading…
Reference in New Issue
Block a user