From 4aa8b6d2fbc32e1fd6e2de231333dc80f88457f8 Mon Sep 17 00:00:00 2001 From: Raymond Kuiper Date: Wed, 13 Mar 2024 13:55:46 +0100 Subject: [PATCH] updated README.md with Docker instructions --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7674a71..6924183 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,33 @@ A script to create, update and delete Zabbix hosts using Netbox device objects. -## Installation +## Installation via Docker + +To pull the latest stable version to your local cache, use the following docker pull command: +``` +docker pull ghcr.io/TheNetworkGuy/netbox-zabbix-sync:latest +``` + +Make sure to specify the needed environment variables for the script to work (see [here](#set-environment-variables)) +on the command line or use an [env file](https://docs.docker.com/reference/cli/docker/container/run/#env). + +``` +docker run -d -t -i -e ZABBIX_HOST='https://zabbix.local' \ +-e ZABBIX_TOKEN='othersecrettoken' \ +-e NETBOX_HOST='https://netbox.local' \ +-e NETBOX_TOKEN='secrettoken' \ +--name netbox-zabbix-sync ghcr.io/TheNetworkGuy/netbox-zabbix-sync:latest +``` + +This should run a one-time sync, you can check the sync with `docker logs`. + +The image uses the default `config.py` for it's configuration, you can use a volume mount in the docker run command +to override with your own config file if needed (see [config file](#config-file)): +``` +docker run -d -t -i -v $(pwd)/config.py:/opt/netbox-zabbix/config.py ... +``` + +## Installation from Source ### Cloning the repository ```