diff --git a/README.md b/README.md index 40f2b024..ea9100ef 100644 --- a/README.md +++ b/README.md @@ -698,7 +698,7 @@ echo 'any text with urls in it' | archivebox a # if using Docker, add -i when piping stdin: # echo 'https://example.com' | docker run -v $PWD:/data -i archivebox/archivebox:dev add # if using Docker Compose, add -T when piping stdin / stdout: -# echo 'https://example.com' | docker compose run -T archivebox add +# echo 'https://example.com' | docker compose run --rm -T archivebox add ``` See the [Usage: CLI](https://github.com/ArchiveBox/ArchiveBox/wiki/Usage#CLI-Usage) page for documentation and examples. @@ -925,7 +925,7 @@ archivebox list --json --with-headers > index.json # export to json blob archivebox list --csv=timestamp,url,title > index.csv # export to csv spreadsheet # (if using Docker Compose, add the -T flag when piping) -# docker compose run -T archivebox list --html 'https://example.com' > index.html +# docker compose run --rm -T archivebox list --html 'https://example.com' > index.html The paths in the static exports are relative, make sure to keep them next to your `./archive` folder when backing them up or viewing them. diff --git a/docker-compose.yml b/docker-compose.yml index 23955daa..4c613983 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,13 +2,13 @@ # mkdir -p ~/archivebox/data && cd ~/archivebox # curl -fsSL 'https://docker-compose.archivebox.io' > docker-compose.yml # docker compose pull -# docker compose run archivebox init -# docker compose run archivebox install +# docker compose run --rm archivebox init +# docker compose run --rm archivebox install # docker compose up -d && open 'http://admin.archivebox.localhost:8000' -# docker compose run archivebox add --depth=1 'https://news.ycombinator.com' -# docker compose run -T archivebox add < ~/Downloads/bookmarks.txt -# docker compose run archivebox help +# docker compose run --rm archivebox add --depth=1 'https://news.ycombinator.com' +# docker compose run --rm -T archivebox add < ~/Downloads/bookmarks.txt +# docker compose run --rm archivebox help # Documentation: # https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#docker-compose @@ -43,14 +43,14 @@ services: ### `archivebox server` now runs the orchestrator itself, so scheduled crawls and queued UI/API jobs # are processed by the main container without needing a separate scheduler sidecar. To add a new job: - # $ docker compose run archivebox schedule --add --every=day --depth=1 'https://example.com/some/rss/feed.xml' + # $ docker compose run --rm archivebox schedule --add --every=day --depth=1 'https://example.com/some/rss/feed.xml' # the running server orchestrator will pick it up automatically at the next due time. # https://github.com/ArchiveBox/ArchiveBox/wiki/Scheduled-Archiving ### ArchiveBox now starts and uses Sonic automatically when SEARCH_BACKEND_ENGINE=sonic. # If Sonic is ever started after not running for a while, update its full-text index by running: - # $ docker compose run archivebox update --index-only + # $ docker compose run --rm archivebox update --index-only # https://github.com/ArchiveBox/ArchiveBox/wiki/Setting-up-Search diff --git a/docs/Chromium-Install.md b/docs/Chromium-Install.md index ef5e6db5..e084680a 100644 --- a/docs/Chromium-Install.md +++ b/docs/Chromium-Install.md @@ -73,8 +73,8 @@ docker compose up -d novnc 3. Start ArchiveBox's Chrome inside Docker ```bash -docker compose run archivebox persona create personal -docker compose run archivebox /data/lib/env/bin/chromium --user-data-dir=/data/personas/personal/chrome_profile --profile-directory=Default --disable-gpu --disable-features=dbus --disable-dev-shm-usage --start-maximized --no-sandbox --disable-setuid-sandbox --no-zygote --disable-sync --no-first-run +docker compose run --rm archivebox persona create personal +docker compose run --rm archivebox /data/lib/env/bin/chromium --user-data-dir=/data/personas/personal/chrome_profile --profile-directory=Default --disable-gpu --disable-features=dbus --disable-dev-shm-usage --start-maximized --no-sandbox --disable-setuid-sandbox --no-zygote --disable-sync --no-first-run ``` (make sure you set `DISPLAY` and keep the normal persistent `/data` volume from the Compose setup!) @@ -89,7 +89,7 @@ docker compose down --remove-orphans # edit docker-compose.yml to remove/comment out the novnc: section # test it all out by archiving something hosted on one of the domains you logged in to -docker compose run archivebox add --persona=personal 'https://private.example.com/some/site/requiring/login.html' +docker compose run --rm archivebox add --persona=personal 'https://private.example.com/some/site/requiring/login.html' # check the SingleFile, Screenshot, DOM, or PDF snapshot output (only these use the Chrome profile) # make sure the content appears as your logged-in user would see it ``` diff --git a/docs/Quickstart.md b/docs/Quickstart.md index 86dd1cfb..d93b4633 100644 --- a/docs/Quickstart.md +++ b/docs/Quickstart.md @@ -49,7 +49,7 @@ archivebox add < your_urls.txt docker run -v $PWD:/data -i archivebox/archivebox:dev add < your_urls.txt # or if using Docker Compose -docker compose run -T archivebox add < your_urls.txt +docker compose run --rm -T archivebox add < your_urls.txt # any text containing URLs can ingested via stdin or as args curl -fsSL 'https://getpocket.com/users/YOURUSERNAME/feed/all' | archivebox add diff --git a/docs/Security-Overview.md b/docs/Security-Overview.md index e3476ee2..9d2b440b 100644 --- a/docs/Security-Overview.md +++ b/docs/Security-Overview.md @@ -105,7 +105,7 @@ More info: > [!NOTE] -> Use `docker compose run archivebox ...` for normal one-shot CLI commands. `docker compose exec archivebox ...` is also supported against a running container; if it starts as root, ArchiveBox drops to the dedicated `archivebox` account before operating on the collection. +> Use `docker compose run --rm archivebox ...` for normal one-shot CLI commands. `docker compose exec archivebox ...` is also supported against a running container; if it starts as root, ArchiveBox drops to the dedicated `archivebox` account before operating on the collection. ArchiveBox drops privileges to the collection owner when it starts as root and can do so safely, including in the official Docker image. Do not bypass that boundary or force runtime dependencies to stay privileged: - Browser sandboxing cannot provide its normal protection when the browser itself runs as root diff --git a/docs/Setting-up-Authentication.md b/docs/Setting-up-Authentication.md index 19a1161e..a624c1bf 100644 --- a/docs/Setting-up-Authentication.md +++ b/docs/Setting-up-Authentication.md @@ -39,7 +39,7 @@ You need a user account to access the Admin UI, you can run the commands below t archivebox manage createsuperuser archivebox manage changepassword -# equivalent: docker compose run archivebox manage [...] +# equivalent: docker compose run --rm archivebox manage [...] # equivalent: docker run -v $PWD:/data archivebox/archivebox:dev manage [...] ``` diff --git a/docs/Setting-up-Search.md b/docs/Setting-up-Search.md index 89fbbf81..cf3ecf1c 100644 --- a/docs/Setting-up-Search.md +++ b/docs/Setting-up-Search.md @@ -131,7 +131,7 @@ archivebox update --index-only archivebox search 'some text to search' ``` -Run the same commands as `docker compose run archivebox ...` when using Docker Compose. +Run the same commands as `docker compose run --rm archivebox ...` when using Docker Compose. *Fore more detailed instructions [see here](https://github.com/ArchiveBox/ArchiveBox/issues/956#issuecomment-1320587158)...* diff --git a/docs/Usage.md b/docs/Usage.md index fd5bcf15..2d0b580b 100644 --- a/docs/Usage.md +++ b/docs/Usage.md @@ -29,7 +29,7 @@ All three of these ways of running ArchiveBox are equivalent and interchangeable *Using the Python package via the current `uv` instructions in [[Install]]* - `docker run ... archivebox/archivebox [subcommand] [...args]` *Using the official Docker image* -- `docker compose run archivebox [subcommand] [...args]` +- `docker compose run --rm archivebox [subcommand] [...args]` *Using the official Docker image w/ Docker Compose* You can share a single archivebox data directory between Docker and non-Docker instances as well, allowing you to run the server in a container but still execute CLI commands on the host for example.