Spaces:
Sleeping
Sleeping
Download Dockerfile from kadarakos/monitoring: direct link, hf CLI and curl.
- Browser
- Download file 726 Bytes
-
https://huggingface.co/spaces/kadarakos/monitoring/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/kadarakos/monitoring/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/kadarakos/monitoring/resolve/main/Dockerfile
726 Bytes
| FROM prom/prometheus:v2.45.0 | |
| USER root | |
| # Create directory with correct permissions for the prometheus user (65534) | |
| RUN mkdir -p /prometheus && chown -R 65534:65534 /prometheus | |
| # Copy the template | |
| COPY prometheus.yml.template /etc/prometheus/prometheus.yml.template | |
| # Reset the entrypoint so we can run a shell script | |
| ENTRYPOINT [] | |
| # Switch to the prometheus user | |
| USER 65534 | |
| # Now we can safely run /bin/sh to process our template with sed | |
| CMD ["/bin/sh", "-c", "\ | |
| sed \"s|\\${HF_TOKEN}|$HF_TOKEN|g\" /etc/prometheus/prometheus.yml.template > /etc/prometheus/prometheus.yml && \ | |
| /bin/prometheus --config.file=/etc/prometheus/prometheus.yml \ | |
| --storage.tsdb.path=/prometheus \ | |
| --web.listen-address=:7860"] | |