This commit is contained in:
2021-04-26 20:23:45 +02:00
parent eb8380fa5b
commit 87ac211e03
4 changed files with 24 additions and 11 deletions

View File

@@ -2,12 +2,25 @@
TAG="1.5-$(date +%Y%m%d)"
find . -name Dockerfile | while read i; do
dir=$(dirname $i)
pushd ${dir} >/dev/null
image="genunix/mailu-$(basename $dir):${TAG}"
build() {
image=$1
echo "[INFO] Building ${image}"
docker build -t ${image} .
docker push ${image}
}
if [ -z "$1" ]; then
find . -name Dockerfile | while read i; do
dir=$(dirname $i)
pushd ${dir} >/dev/null
image="genunix/mailu-$(basename $dir):${TAG}"
build ${image}
popd >/dev/null
done
else
dir=$(basename $1)
image="genunix/mailu-$(basename $dir):${TAG}"
pushd "$1" >/dev/null
build "$image"
popd >/dev/null
done
fi

View File

@@ -5,7 +5,7 @@ WORKDIR /app
COPY requirements-prod.txt requirements.txt
RUN apk add --no-cache openssl \
&& apk add --no-cache --virtual build-dep openssl-dev libffi-dev python-dev build-base \
&& apk add --no-cache --virtual build-dep openssl-dev libffi-dev python3-dev build-base \
&& pip install -r requirements.txt \
&& apk del build-dep

View File

@@ -2,8 +2,8 @@ FROM alpine:3.13
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --no-cache \
dovecot dovecot-sqlite dovecot-pigeonhole-plugin dovecot-pigeonhole-plugin-extdata \
rspamd-client@testing python py-jinja2
dovecot dovecot-sqlite dovecot-pigeonhole-plugin \
rspamd-client python3 py3-jinja2
COPY conf /conf
COPY sieve /var/lib/dovecot

View File

@@ -33,6 +33,6 @@ convert("/conf/rsyslog.conf", "/etc/rsyslog.conf")
# Run postfix
if os.path.exists("/var/run/rsyslogd.pid"):
os.remove("/var/run/rsyslogd.pid")
os.system("/usr/lib/postfix/post-install meta_directory=/etc/postfix create-missing")
os.system("/usr/lib/postfix/master &")
os.system("/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing")
os.system("/usr/sbin/postfix start")
os.execv("/usr/sbin/rsyslogd", ["rsyslogd", "-n"])