diff options
| author | Danilo Sousa <danilopopeye@users.noreply.github.com> | 2016-08-26 14:50:25 -0300 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-26 14:50:25 -0300 | 
| commit | 43272714ed4e1c353afdc633e836711da571f7aa (patch) | |
| tree | c0b5d268f2fce4a93983a72896232ef38a43f028 /README.md | |
| parent | 34f9baf4cc7e95eda848f3362b76118cd5a8c5e7 (diff) | |
ready: cleanup exited container & better docs
the first container run it's only needed for creating the config file,
so we run it with `--rm` to be removed after its exit
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 56 | 
1 files changed, 32 insertions, 24 deletions
| @@ -254,46 +254,54 @@ rvm use --default 2.1.2  ```  # Running with Docker -1. clone git repo: + +clone git repo:  ``` -    root@bla:~# git clone https://github.com/ytti/oxidized -``` -2. build container locally: +git clone https://github.com/ytti/oxidized  ``` -    root@bla:~# docker build -q -t oxidized/oxidized:latest oxidized/ + +build container locally: +  ``` -3. create config directory in main system: +docker build -q -t oxidized/oxidized:latest oxidized/  ``` -    root@bla~:# mkdir /etc/oxidized + +create config directory in main system: +  ``` -4. run container the first time: +mkdir /etc/oxidized  ``` -    root@bla:~# docker run -v /etc/oxidized:/root/.config/oxidized -p 8888:8888/tcp -t oxidized/oxidized:latest oxidized + +run container the first time: +_Note: this step in only needed for creating Oxidized's configuration file and can be skipped if you already have it +  ``` -5. add 'router.db' to /etc/oxidized: +docker run --rm -v /etc/oxidized:/root/.config/oxidized -p 8888:8888/tcp -t oxidized/oxidized:latest oxidized  ``` -    root@bla:~# vim /etc/oxidized/router.db -    [ ... ] -    root@bla:~# + +create the `/etc/oxidized/router.db` +  ``` -6. run container again: +vim /etc/oxidized/router.db  ``` -    root@bla:~# docker run -v /etc/oxidized:/root/.config/oxidized -p 8888:8888/tcp -t oxidized/oxidized:latest -    oxidized[1]: Oxidized starting, running as pid 1 -    oxidized[1]: Loaded 1 nodes -    Puma 2.13.4 starting... -    * Min threads: 0, max threads: 16 -    * Environment: development -    * Listening on tcp://0.0.0.0:8888 -    ^C -    root@bla:~# +run container again: + +``` +docker run -v /etc/oxidized:/root/.config/oxidized -p 8888:8888/tcp -t oxidized/oxidized:latest +oxidized[1]: Oxidized starting, running as pid 1 +oxidized[1]: Loaded 1 nodes +Puma 2.13.4 starting... +* Min threads: 0, max threads: 16 +* Environment: development +* Listening on tcp://0.0.0.0:8888  ```  If you want to have the config automatically reloaded (e.g. when using a http source that changes) +  ``` -    root@bla:~# docker run -v /etc/oxidized:/root/.config/oxidized -p 8888:8888/tcp -e CONFIG_RELOAD_INTERVAL=3600 -t oxidized/oxidized:latest +docker run -v /etc/oxidized:/root/.config/oxidized -p 8888:8888/tcp -e CONFIG_RELOAD_INTERVAL=3600 -t oxidized/oxidized:latest  ```  ## Cookbook | 
