Created
January 9, 2020 07:39
-
-
Save jiacai2050/1fd35a03e8135059e432632642b91924 to your computer and use it in GitHub Desktop.
custom prometheus docker file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM prom/prometheus:v2.12.0 | |
COPY ./start.sh /start.sh | |
ENTRYPOINT ["/start.sh"] | |
CMD [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -x | |
exec /bin/prometheus --config.file=/etc/prometheus/prometheus.yml \ | |
--storage.tsdb.path=/prometheus \ | |
--web.console.libraries=/usr/share/prometheus/console_libraries \ | |
--web.console.templates=/usr/share/prometheus/consoles \ | |
--storage.tsdb.retention.time=${PROM_RETENTION_TIME:-15d} \ | |
${PROM_EXTRA_ARGS} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The default prometheus dockerfile isn't very suitable for custom, if one want provide some flags, they have to provide all flags since docker will overwrite CMD rather than append them.