add /start.d for running startup time scripts

This commit is contained in:
Mauro Torrez 2019-09-09 23:48:49 -03:00
parent 00259ff95e
commit 27d82fb5be

View File

@ -95,7 +95,8 @@
FROM debian:buster-slim FROM debian:buster-slim
ARG CONFD_VERSION={{ docker_confd_version }} ARG CONFD_VERSION={{ docker_confd_version }}
ADD https://github.com/kelseyhightower/confd/releases/download/v${CONFD_VERSION}/confd-${CONFD_VERSION}-linux-amd64 /usr/local/bin/confd ADD https://github.com/kelseyhightower/confd/releases/download/v${CONFD_VERSION}/confd-${CONFD_VERSION}-linux-amd64 /usr/local/bin/confd
RUN printf '#!/bin/bash\n/usr/local/bin/confd -onetime -backend env\nexec ${@}' > /entrypoint.sh \ RUN mkdir -p /start.d \
&& printf '#!/bin/bash\nset -e\n/usr/local/bin/confd -onetime -backend env\nfind /start.d -maxdepth 1 -type f -exec cmd option {} \;\nexec ${@}\n' > /entrypoint.sh \
&& mkdir -p /etc/confd/{conf.d,templates} \ && mkdir -p /etc/confd/{conf.d,templates} \
&& chmod +x /usr/local/bin/confd /entrypoint.sh && chmod +x /usr/local/bin/confd /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]