From b025ed61b91cf41e9e0a3a26d16a0d00b9f44f04 Mon Sep 17 00:00:00 2001 From: Rahul Date: Wed, 27 Sep 2023 22:22:41 +0530 Subject: [PATCH] doc: harvest configuration file from other location with docker run generate (#2377) * doc: harvest configuration file from other location with docker run generate --- docs/install/containers.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/install/containers.md b/docs/install/containers.md index 5e673d8bc..dc9930906 100644 --- a/docs/install/containers.md +++ b/docs/install/containers.md @@ -77,6 +77,22 @@ docker run --rm \ --output harvest-compose.yml ``` +By default, the above command uses the harvest configuration file(`harvest.yml`) located in the current directory. If you want to use a harvest config from a different location. +??? question "What if my harvest configuration file is somewhere else or not named harvest.yml" + Use the following docker run command, updating the `HYML` variable with the absolute path to your `harvest.yml`. + + ```sh + HYML="/opt/custom_harvest.yml" \ + docker run --rm \ + --entrypoint "bin/harvest" \ + --volume "$(pwd):/opt/temp" \ + --volume "${HYML}:${HYML}" \ + ghcr.io/netapp/harvest:latest \ + generate docker full \ + --output harvest-compose.yml \ + --config "${HYML}" + ``` + `generate docker full` does two things: 1. Creates a Docker compose file with a container for each Harvest poller defined in your `harvest.yml`