Public | Automated Build

Last pushed: 2 years ago
Short Description
-
Full Description

Install dokcer

When you want know if you have docker you need:

$ docker -v
Docker version 1.10.2, build c3959b1

If you don't have dokcer you need Install Docker

Usage

Install influxdb image :

$ docker pull msha/influxdb:0.9
$ docker run -d -p 8083:8083 -p 8086:8086 --name influxdb -e PRE_CREATE_DB="graphite" msha/influxdb:0.9
$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS                                            NAMES
ee78b4de5745        msha/influxdb:0.9   "/run.sh"                2 minutes ago        Up 2 minutes        0.0.0.0:8083->8083/tcp, 0.0.0.0:8086->8086/tcp   influxdb
  • -d: your container will run in “detached” mode, in the background
  • -p: you assign self port for port container
  • --name: you assign name to container for ease access to container
  • -e : auto create database with name 'graphite'

Influxdb

You can see influxdb on http://localhost:8083/ if you don't connect to http://localhost:8083/ you need to check:

$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS                                            NAMES
ee78b4de5745        msha/influxdb:0.9   "/run.sh"                2 minutes ago        Up 2 minutes        0.0.0.0:8083->8083/tcp, 0.0.0.0:8086->8086/tcp   influxdb

Install graphite image :

$ docker pull msha/graphite-api
$ docker run -it --link influxdb:msha/influxdb -d -p 8081:8000 --name graphite msha/graphite-api
$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS                                            NAMES
7508c96b4f1c        msha/graphite-api   "/bin/sh -c 'gunicorn"   About a minute ago   Up About a minute   0.0.0.0:8081->8000/tcp                           graphite
ee78b4de5745        msha/influxdb:0.9   "/run.sh"                2 minutes ago        Up 2 minutes        0.0.0.0:8083->8083/tcp, 0.0.0.0:8086->8086/tcp   influxdb
  • -it: instructs Docker to allocate a pseudo-TTY connected to the container’s stdin
  • --link: add link to another container

Check connectivity container:

$ docker exec graphite cat /etc/hosts
127.0.0.1    localhost
...
172.17.0.3    influxdb cd27bf330f15
172.17.0.2    155c83f55857
$ curl http://localhost:8081/metrics/index.json
[]
Docker Pull Command
Owner
msha
Source Repository