[Dockerfiles] Rename some files and create hook points
parent
b02f73e68e
commit
b0711db489
|
@ -17,7 +17,7 @@ RUN apk upgrade --no-cache \
|
|||
&& python3 -m pip install --upgrade pip \
|
||||
&& python3 -m pip install acme-tiny
|
||||
|
||||
COPY docker-entrypoint.sh /srv/docker-entrypoint.sh
|
||||
COPY acme.sh /srv/acme.sh
|
||||
COPY expand6.sh /srv/expand6.sh
|
||||
|
||||
CMD ["/sbin/tini", "-g", "--", "/srv/docker-entrypoint.sh"]
|
||||
CMD ["/sbin/tini", "-g", "--", "/srv/acme.sh"]
|
||||
|
|
|
@ -55,7 +55,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
&& adduser --system --no-create-home --home /var/lib/clamav --uid 700 --gid 700 --disabled-login clamav \
|
||||
&& rm -rf /tmp/* /var/tmp/*
|
||||
|
||||
COPY bootstrap.sh ./
|
||||
COPY clamd.sh ./
|
||||
COPY tini /sbin/tini
|
||||
|
||||
CMD ["/sbin/tini", "-g", "--", "/bootstrap.sh"]
|
||||
CMD ["/sbin/tini", "-g", "--", "/clamd.sh"]
|
||||
|
|
|
@ -7,6 +7,6 @@ RUN apk add --update --no-cache python3 openssl tzdata \
|
|||
&& pip3 install --upgrade pip \
|
||||
&& pip3 install --upgrade docker flask flask-restful
|
||||
|
||||
COPY server.py /app/
|
||||
COPY dockerapi.py /app/
|
||||
|
||||
CMD ["python3", "-u", "/app/server.py"]
|
||||
CMD ["python3", "-u", "/app/dockerapi.py"]
|
||||
|
|
|
@ -260,4 +260,12 @@ fi
|
|||
# Collect SA rules once now
|
||||
/usr/local/bin/sa-rules.sh
|
||||
|
||||
# Run hooks
|
||||
for file in /hooks/*; do
|
||||
if [ -x "${file}" ]; then
|
||||
echo "Running hook ${file}"
|
||||
"${file}"
|
||||
fi
|
||||
done
|
||||
|
||||
exec "$@"
|
||||
|
|
|
@ -85,4 +85,5 @@ RUN apk add -U --no-cache autoconf \
|
|||
COPY ./docker-entrypoint.sh /
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
CMD ["php-fpm"]
|
||||
|
|
|
@ -123,4 +123,12 @@ EOF
|
|||
fi
|
||||
fi
|
||||
|
||||
# Run hooks
|
||||
for file in /hooks/*; do
|
||||
if [ -x "${file}" ]; then
|
||||
echo "Running hook ${file}"
|
||||
"${file}"
|
||||
fi
|
||||
done
|
||||
|
||||
exec "$@"
|
||||
|
|
|
@ -34,4 +34,12 @@ chown -R _rspamd:_rspamd /var/lib/rspamd \
|
|||
/etc/rspamd/rspamd.conf.override \
|
||||
/etc/rspamd/plugins.d
|
||||
|
||||
# Run hooks
|
||||
for file in /hooks/*; do
|
||||
if [ -x "${file}" ]; then
|
||||
echo "Running hook ${file}"
|
||||
"${file}"
|
||||
fi
|
||||
done
|
||||
|
||||
exec "$@"
|
||||
|
|
|
@ -4,7 +4,7 @@ USER root
|
|||
|
||||
ENV GOSU_VERSION 1.11
|
||||
|
||||
COPY docker-entrypoint.sh /
|
||||
COPY solr.sh /
|
||||
COPY solr-config-7.7.0.xml /
|
||||
COPY solr-schema-7.7.0.xml /
|
||||
|
||||
|
@ -18,8 +18,8 @@ RUN dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
|
|||
bash \
|
||||
&& apt-get autoclean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& chmod +x /docker-entrypoint.sh \
|
||||
&& chmod +x /solr.sh \
|
||||
&& sync \
|
||||
&& bash /docker-entrypoint.sh --bootstrap
|
||||
&& bash /solr.sh --bootstrap
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["/solr.sh"]
|
||||
|
|
|
@ -19,3 +19,5 @@ EXPOSE 53/udp 53/tcp
|
|||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
CMD ["/usr/sbin/unbound"]
|
||||
|
|
|
@ -8,4 +8,13 @@ echo "Receiving anchor key..."
|
|||
echo "Receiving root hints..."
|
||||
curl -#o /etc/unbound/root.hints https://www.internic.net/domain/named.cache
|
||||
/usr/sbin/unbound-control-setup
|
||||
|
||||
# Run hooks
|
||||
for file in /hooks/*; do
|
||||
if [ -x "${file}" ]; then
|
||||
echo "Running hook ${file}"
|
||||
"${file}"
|
||||
fi
|
||||
done
|
||||
|
||||
exec "$@"
|
||||
|
|
|
@ -34,7 +34,4 @@ RUN apk add --update \
|
|||
|
||||
COPY watchdog.sh /watchdog.sh
|
||||
|
||||
#ENTRYPOINT ["/sbin/tini", "-g", "--"]
|
||||
# Less verbose
|
||||
|
||||
CMD /watchdog.sh 2> /dev/null
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
Place executable scripts in each directory to run a hook at the end of a docker-entrypoint.sh script.
|
||||
|
||||
Only images with a docker-entrypoint are covered.
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo blabla
|
||||
echo dasdasd
|
Loading…
Reference in New Issue