From 76821c11f82178b118ecf09020c8676ff912cc4d Mon Sep 17 00:00:00 2001 From: k0rventen Date: Tue, 25 May 2021 11:50:42 +0200 Subject: [PATCH] add docker documentation --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 49f4eac..58315fd 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,29 @@ To import only device by APC, for example: ./nb-dt-import.py --vendors apc juniper ``` +## Docker build + +It's possible to use this project as a docker container. + +To build : + +``` +docker build -t netbox-devicetype-import-library . +``` + +The container supports the following env var as configuration : + +- `REPO_URL`, the repo to look for device types (defaults to _https://github.com/netbox-community/devicetype-library.git_) +- `NETBOX_URL`, used to access netbox +- `NETBOX_TOKEN`, token for accessing netbox +- `VENDORS`, a space-separated list of vendors to import (defaults to None) + +To run : + +``` +docker run -e "NETBOX_URL=http://netbox:8080/" -e "NETBOX_TOKEN=98765434567890" netbox-devicetype-import-library +``` + ## 🧑‍💻 Contributing We're happy about any pull requests!