From 9d03aef6ae4d645f19cb9fa57263b3cf35650cd8 Mon Sep 17 00:00:00 2001 From: Peter Benjamin Date: Mon, 9 Oct 2023 14:34:43 -0700 Subject: [PATCH] docs: update docker instructions to specify how users can pass custom config to spidy in docker --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3d9ab37..7cc13a0 100644 --- a/README.md +++ b/README.md @@ -114,10 +114,11 @@ Spidy can be easily run in a Docker container.
- First, build the [`Dockerfile`](dockerfile): `docker build -t spidy .` - Verify that the Docker image has been created: `docker images` -- Then, run it: `docker run --rm -it -v $PWD:/data spidy` +- Then, run it with a data path mount (where you wish files to be written to on your local disk). For example, if you wish to have results written to your local `/tmp` directory, run spidy with this command: `docker run --rm -it -v /tmp:/data spidy` - `--rm` tells Docker to clean up after itself by removing stopped containers. - `-it` tells Docker to run the container interactively and allocate a pseudo-TTY. - - `-v $PWD:/data` tells Docker to mount the current working directory as `/data` directory inside the container. This is needed if you want Spidy's files (e.g. `crawler_done.txt`, `crawler_words.txt`, `crawler_todo.txt`) written back to your host filesystem. + - `-v /tmp:/data` tells Docker to mount the a host path/directory as `/data` directory inside the container. This is needed if you want Spidy's files (e.g. `crawler_done.txt`, `crawler_words.txt`, `crawler_todo.txt`) written back to your host filesystem. +- To use custom spidy configurations, mount the configuration files from your host into any path inside the container. For example, assuming your config files are in `$HOME/.spidy`, mount them into `/config` inside the container with `-v ~/.spidy:/config/`. Then, when prompted for the custom config, provide the container path, like `/config/test.cfg`. ### Spidy Docker Demo