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

View File

@@ -5,7 +5,7 @@ WORKDIR /app
COPY requirements-prod.txt requirements.txt COPY requirements-prod.txt requirements.txt
RUN apk add --no-cache openssl \ 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 \ && pip install -r requirements.txt \
&& apk del build-dep && 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 \ RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --no-cache \ && apk add --no-cache \
dovecot dovecot-sqlite dovecot-pigeonhole-plugin dovecot-pigeonhole-plugin-extdata \ dovecot dovecot-sqlite dovecot-pigeonhole-plugin \
rspamd-client@testing python py-jinja2 rspamd-client python3 py3-jinja2
COPY conf /conf COPY conf /conf
COPY sieve /var/lib/dovecot COPY sieve /var/lib/dovecot

View File

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