Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
docs
Commits
c076867f
Commit
c076867f
authored
Jan 26, 2015
by
juliusv
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19 from discordianfish/add-docker-install
Add Docker install instructions
parents
b4e8a723
c48bc2c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
1 deletion
+55
-1
install.md
content/docs/introduction/install.md
+55
-1
No files found.
content/docs/introduction/install.md
View file @
c076867f
...
@@ -17,4 +17,58 @@ For building Prometheus from source, see the relevant [`README.md` section](http
...
@@ -17,4 +17,58 @@ For building Prometheus from source, see the relevant [`README.md` section](http
## Using Docker
## Using Docker
TODO: Add docker instructions.
All Prometheus services are available as Docker images under the
[
prom
](
https://registry.hub.docker.com/repos/prom/
)
organization.
Running Prometheus on Docker is as simple as
`docker run -p 9090:9090 prom/prometheus`
. This starts Prometheus with
a sample configuration and exposes it on port 9090.
The Prometheus image uses a volume to store the actual metrics. For
production deployments it is highly recommended to use the
[
Data Volume Container
](
https://docs.docker.com/userguide/dockervolumes/#creating-and-mounting-a-data-volume-container
)
pattern to ease managing the data on Prometheus upgrades.
To provide your own configuration, there are several options. Here are
two examples.
### Volumes & bind-mount
Bind-mount your prometheus.conf from the host by running:
```
docker run -p 9090:9090 -v /tmp/prometheus.conf:/prometheus.conf \
prom/prometheus
```
Or use an additional volume for the config:
```
docker run -p 9090:9090 -v /prometheus-data \
prom/prometheus -config.file=/prometheus-data/prometheus.conf
```
### Custom image
To avoid managing a file on the host and bind-mount it, the
configuration can be baked into the image. This works well if the
configuration itself is rather static and the same across all
environments.
For this, create a new directory with a Prometheus configuration and a
Dockerfile like this:
```
FROM prom/prometheus
ADD prometheus.conf /
```
Now build and run it:
```
docker build -t my-prometheus .
docker run -p 9090:9090 my-prometheus
```
A more advanced option is to render the config dynamically on start
with some tooling or even have a daemon update it periodically.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment