From 4f4bd6b11d8fe2778276d1f76171209e36ca2639 Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 1 May 2023 13:01:26 +0100 Subject: [PATCH] docs: Docker Information Updates (#82) --- README.md | 6 ++++-- root/etc/s6-overlay/s6-rc.d/init-packt-cli-config/run | 8 -------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6b6e795c..06e0e987 100644 --- a/README.md +++ b/README.md @@ -24,17 +24,19 @@ docker run -d \ -v /home/user/packt/config:/config \ -v /home/user/packt/books:/data \ --restart unless-stopped - ghcr.io/ghostwriters/docker-packt-cli/docker-packt-cli:latest + ghcr.io/ghostwriters/docker-packt-cli:latest ``` You will need to replace `` and `` with your Packt account email and password, respectively. Additionally, you can customize the output formats of the downloaded books by modifying the `PACKT_DOWNLOAD_FORMATS` environment variable. The default formats are `pdf`, `epub`, `mobi`, and `code`. -To automatically solve the CAPTCHA, you will need an AntiCaptcha API key, which you can set by attaching the `-e PACKT_ANTICAPTCHA_KEY=` flag to your docker run command. +To automatically solve the CAPTCHA, you will need an [AntiCaptcha](https://anti-captcha.com/) API key, which you can set by attaching the `-e PACKT_ANTICAPTCHA_KEY=` flag to your docker run command. You can mount two volumes to persist the Packt credentials and store the downloaded books in a directory on your host system. The `/config` directory will store your Packt credentials, and the `/data` directory will store the downloaded books. You can change the paths of the host directories by modifying the values after the `-v` flag. Once you run the container, it will automatically download a free eBook each day from Packt publishing and store the files in the `/home/user/packt/books` directory on your host system. +If you would prefer to use an alternative to ghcr.io, you can use the image hosted on [Docker Hub](https://hub.docker.com/repository/docker/ghostwriters/docker-packt-cli) `ghostwriters/docker-packt-cli:latest`, + ## GitHub Actions Used - [actions/checkout](https://github.com/actions/checkout) - Action for checking out code from a repository. diff --git a/root/etc/s6-overlay/s6-rc.d/init-packt-cli-config/run b/root/etc/s6-overlay/s6-rc.d/init-packt-cli-config/run index ee294f4d..97aab317 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-packt-cli-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-packt-cli-config/run @@ -31,14 +31,6 @@ else echo "ENV PACKT_DOWNLOAD_FORMATS not set" fi -if [[ -n "$PACKT_DOWNLOAD_BOOK_TITLES" ]]; then - echo "ENV PACKT_DOWNLOAD_BOOK_TITLES provided as \"$PACKT_DOWNLOAD_BOOK_TITLES\"" - sed -i "s/download_book_titles:.*/download_book_titles:\ \"$PACKT_DOWNLOAD_BOOK_TITLES\"/" "$CFG" -else - echo "ENV PACKT_DOWNLOAD_BOOK_TITLES not set" - sed -i "s/download_book_titles:.*/download_book_titles:/" "$CFG" -fi - if [[ -n "$PACKT_ANTICAPTCHA_KEY" ]]; then echo "ENV PACKT_ANTICAPTCHA_Key provided" sed -i "s/key:.*/key:\ \"$PACKT_ANTICAPTCHA_KEY\"/" "$CFG"