first commit

master
Andy 6 years ago
commit 1df811cc62
Signed by: arno
GPG Key ID: 9076D5E6B31AE99C

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

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

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

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

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

@ -0,0 +1,11 @@
#!/bin/bash
IMAGE=dovecot
docker build -t $IMAGE .
docker rm -f $IMAGE
docker run -d \
-h $(hostname -f) \
--name $IMAGE \
-v /etc/localtime:/etc/localtime:ro \
$IMAGE
Loading…
Cancel
Save