Dockerfile/entrypoint are Jenkins-ready now

This commit is contained in:
Dominik Chilla 2019-07-09 10:12:42 +02:00
parent c4e21a38dd
commit 4d6950e094
3 changed files with 6 additions and 14 deletions

View File

@ -3,7 +3,6 @@
BRANCH="$(/usr/bin/git branch|/bin/grep \*|/usr/bin/awk {'print $2'})"
VERSION="$(/bin/cat VERSION)"
BASEOS="$(/bin/cat BASEOS)"
#REGISTRY="some-registry.invalid"
GO=""
while getopts g opt
@ -22,15 +21,7 @@ fi
IMAGES="ldap-acl-milter"
for IMAGE in ${IMAGES}; do
# --build-arg http_proxy=http://wprx-zdf.zwackl.local:3128 \
# --build-arg https_proxy=http://wprx-zdf.zwackl.local:3128 \
/usr/bin/docker build \
-t "${IMAGE}/${BASEOS}:${VERSION}_${BRANCH}" \
-t "${IMAGE}:${BRANCH}" \
-f "docker/${BASEOS}/Dockerfile" .
# /usr/bin/docker tag "${IMAGE}/${BASEOS}:${VERSION}_${BRANCH}" "${REGISTRY}/${IMAGE}/${BASEOS}:${VERSION}_${BRANCH}"
done
#/bin/echo "Push images to registry:"
#for IMAGE in ${IMAGES}; do
# /bin/echo "/usr/bin/docker push ${REGISTRY}/${IMAGE}/${BASEOS}:${VERSION}_${BRANCH}"
#done

View File

@ -2,7 +2,7 @@ ARG http_proxy
ARG https_proxy
FROM debian
LABEL maintainer="Dominik Chilla <dominik@zwackl.de>"
LABEL git_repo="https://github.com/chillout2k/ldap-acl-milter/tree/devel"
LABEL git_repo="https://github.com/chillout2k/ldap-acl-milter"
ENV DEBIAN_FRONTEND=noninteractive \
TZ=Europe/Berlin
@ -18,7 +18,8 @@ RUN env; set -ex ; \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY app/*.py /app/
COPY entrypoint.sh /entrypoint.sh
ADD app/*.py /app/
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/usr/bin/python3", "/app/ldap-acl-milter.py"]

View File

@ -4,4 +4,4 @@ set -x
set -e
umask 0000
ulimit -n 1024
/usr/bin/python3 /app/ldap-acl-milter.py
exec "$@"