prometheus-with-blackbox/cron/Dockerfile
Eliezer Croitoru c8e9cc2cc9 1
2024-06-18 18:53:38 +03:00

20 lines
602 B
Docker

FROM ubuntu:24.04
RUN apt update && \
apt install -y cron ruby ruby-mysql2 && \
apt clean all
COPY cron /etc/cron.d/cron
COPY bin/dump-registry-targets.sh /usr/local/bin/dump-registry-targets.sh
COPY bin/dump-targets-by-target-type.rb /usr/local/bin/dump-targets-by-target-type.rb
RUN chmod 0644 /etc/cron.d/cron && \
chmod +x /usr/local/bin/dump-targets-by-target-type.rb && \
chmod +x /usr/local/bin/dump-registry-targets.sh && \
crontab /etc/cron.d/cron && \
ln -s /dev/stdout /var/log/cron && \
mkdir -p /var/www/html/blackbox && \
chmod a+wrx /var/www/html/blackbox
CMD ["cron", "-f"]