forked from images/gitea-image-forge
Add alt/prometheus image
This commit is contained in:
parent
9d6451a981
commit
21a8804c30
11
org/alt/prometheus/Dockerfile.template
Normal file
11
org/alt/prometheus/Dockerfile.template
Normal file
@ -0,0 +1,11 @@
|
||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("prometheus") }}
|
||||
|
||||
WORKDIR /var/lib/prometheus
|
||||
USER prometheus
|
||||
EXPOSE 9090
|
||||
VOLUME [ "/var/lib/prometheus" ]
|
||||
ENTRYPOINT [ "/usr/bin/prometheus", "--config.file=/etc/prometheus/prometheus.yml"]
|
24
org/alt/prometheus/README.md
Normal file
24
org/alt/prometheus/README.md
Normal file
@ -0,0 +1,24 @@
|
||||
# Prometheus image
|
||||
|
||||
Command for run:
|
||||
```
|
||||
docker run -d --name="prometheus" -p 9090:9090 -v promdata:/var/lib/prometheus IMAGENAME
|
||||
```
|
||||
|
||||
*If you want to be able to view services on localhost, instead of -p, specify the flag:
|
||||
```
|
||||
--network="host"
|
||||
```
|
||||
Prometheus will see all the services running on your local hosting, without this it will not be able to access your ports
|
||||
|
||||
|
||||
To upload your own configuration, create prometheus.yml, you can use example from:
|
||||
```
|
||||
https://raw.githubusercontent.com/prometheus/prometheus/main/documentation/examples/prometheus.yml
|
||||
```
|
||||
Then, while the container is running, enter its command:
|
||||
```
|
||||
docker cp $PWD/prometheus.yml prometheus:/etc/prometheus/prometheus.yml
|
||||
|
||||
docker restart prometheus
|
||||
```
|
Loading…
Reference in New Issue
Block a user