Fixes
This commit is contained in:
19
build.sh
19
build.sh
@@ -2,12 +2,25 @@
|
|||||||
|
|
||||||
TAG="1.5-$(date +%Y%m%d)"
|
TAG="1.5-$(date +%Y%m%d)"
|
||||||
|
|
||||||
|
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
|
find . -name Dockerfile | while read i; do
|
||||||
dir=$(dirname $i)
|
dir=$(dirname $i)
|
||||||
pushd ${dir} >/dev/null
|
pushd ${dir} >/dev/null
|
||||||
image="genunix/mailu-$(basename $dir):${TAG}"
|
image="genunix/mailu-$(basename $dir):${TAG}"
|
||||||
echo "[INFO] Building ${image}"
|
build ${image}
|
||||||
docker build -t ${image} .
|
|
||||||
docker push ${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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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"])
|
||||||
|
|||||||
Reference in New Issue
Block a user