mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-26 07:44:41 +02:00
Updated Docker (markdown)
29
Docker.md
29
Docker.md
@@ -92,23 +92,21 @@ See the wiki page on [Upgrading or Merging Archives: Upgrading with Docker Compo
|
|||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
|
You can use `docker compose run archivebox [subcommand]` just like the non-Docker `archivebox [subcommand]` CLI.
|
||||||
|
|
||||||
|
First, make sure you're `cd`'ed into the same folder as your `docker-compose.yml` file (e.g. `~/archivebox`):
|
||||||
```bash
|
```bash
|
||||||
docker compose run archivebox help
|
docker compose run archivebox help
|
||||||
```
|
```
|
||||||
|
|
||||||
First, make sure you're `cd`'ed into the same folder as your `docker-compose.yml` file (e.g. `~/archivebox`).
|
To add an individual URL, pass it in as an arg or via stdin:
|
||||||
|
|
||||||
To add new URLs, you can use `docker compose run archivebox [subcommand]` just like the non-Docker `archivebox [subcommand]` CLI.
|
|
||||||
|
|
||||||
To add an individual URL, pass it in as an arg or via stdin.
|
|
||||||
```bash
|
```bash
|
||||||
docker compose run archivebox add 'https://example.com'
|
docker compose run archivebox add 'https://example.com'
|
||||||
# OR
|
# OR
|
||||||
echo 'https://example.com' | docker compose run archivebox add
|
echo 'https://example.com' | docker compose run archivebox add
|
||||||
```
|
```
|
||||||
|
|
||||||
To add multiple URLs at once, pipe them in via stdin, or place them in a file inside `./data/sources` so that ArchiveBox can access it from within the container.
|
To add multiple URLs at once, pipe them in via stdin, or place them in a file inside `./data/sources` so that ArchiveBox can access it from within the container:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# pipe URLs in from a file outside Docker
|
# pipe URLs in from a file outside Docker
|
||||||
docker compose run archivebox add < ~/Downloads/example_urls.txt
|
docker compose run archivebox add < ~/Downloads/example_urls.txt
|
||||||
@@ -121,7 +119,7 @@ curl 'https://example.com/some/rss/feed.xml' | docker compose run archivebox add
|
|||||||
docker compose run archivebox add --depth=1 'https://example.com/some/rss/feed.xml'
|
docker compose run archivebox add --depth=1 'https://example.com/some/rss/feed.xml'
|
||||||
```
|
```
|
||||||
|
|
||||||
The `--depth=1` flag tells archivebox to look inside the provided source and archive all the URLs within:
|
The `--depth=1` flag tells ArchiveBox to look inside the provided source and archive all the URLs within:
|
||||||
```bash
|
```bash
|
||||||
# this archives just the RSS file itself (probably not what you want)
|
# this archives just the RSS file itself (probably not what you want)
|
||||||
docker compose run archivebox add 'https://example.com/some/feed.rss'
|
docker compose run archivebox add 'https://example.com/some/feed.rss'
|
||||||
@@ -215,30 +213,29 @@ See the wiki page on [Upgrading or Merging Archives: Upgrading with plain Docker
|
|||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
```bash
|
The Docker CLI `docker run ... archivebox/archivebox [subcommand]` works just like the non-Docker `archivebox [subcommand]` CLI.
|
||||||
docker run -it archivebox/archivebox help
|
|
||||||
```
|
|
||||||
|
|
||||||
First, make sure you're `cd`'ed into your collection data folder (e.g. `~/archivebox`).
|
First, make sure you're `cd`'ed into your collection data folder (e.g. `~/archivebox`).
|
||||||
|
|
||||||
The Docker CLI `docker run ... archivebox/archivebox [subcommand]` works just like the non-Docker `archivebox [subcommand]` CLI.
|
```bash
|
||||||
|
docker run -it -v $PWD:/data archivebox/archivebox help
|
||||||
**To add a single URL to the archive** or a list of links from a file, pipe them in via stdin. This will archive each link passed in.
|
```
|
||||||
|
|
||||||
|
To add a single URL, pass it as an arg or pipe it in via stdin:
|
||||||
```bash
|
```bash
|
||||||
docker run -it -v $PWD:/data archivebox/archivebox add 'https://example.com'
|
docker run -it -v $PWD:/data archivebox/archivebox add 'https://example.com'
|
||||||
# OR
|
# OR
|
||||||
echo 'https://example.com' | docker run -i -v $PWD:/data archivebox/archivebox add
|
echo 'https://example.com' | docker run -i -v $PWD:/data archivebox/archivebox add
|
||||||
```
|
```
|
||||||
|
|
||||||
To archive multiple URLs at once, pass text containing URLs in via stdin.
|
To archive multiple URLs at once, pass text containing URLs in via stdin:
|
||||||
```bash
|
```bash
|
||||||
docker run -i -v $PWD:/data archivebox/archivebox add < urls.txt
|
docker run -i -v $PWD:/data archivebox/archivebox add < urls.txt
|
||||||
# OR
|
# OR
|
||||||
curl 'https://example.com/some/rss/feed.xml' | docker run -i -v $PWD:/data archivebox/archivebox add
|
curl 'https://example.com/some/rss/feed.xml' | docker run -i -v $PWD:/data archivebox/archivebox add
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also use the `--depth=1` flag to tell ArchiveBox to recursively archive the URLs within the provided source.
|
You can also use the `--depth=1` flag to tell ArchiveBox to recursively archive the URLs within a provided source.
|
||||||
```bash
|
```bash
|
||||||
docker run -it -v $PWD:/data archivebox/archivebox add --depth=1 'https://example.com/some/rss/feed.xml'
|
docker run -it -v $PWD:/data archivebox/archivebox add --depth=1 'https://example.com/some/rss/feed.xml'
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user