Thanks to the community for helping out with setting up this repo for usage with Docker. Find usage instructions below.
docker build . \
-t amazon-kindle-bulk-downloader
Run the built Docker image ensuring to pass in all the required ENV vars and any CLI flags you wish to override. See below for an example:
docker run \
--rm \
-ti \
-v ./downloads:/app/downloads \
-e AMAZON_USER=userName \
-e PASSWORD=pass \
-e OTP=otpCode \
amazon-kindle-bulk-downloader \
--baseUrl "https://www.amazon.com"
Set environment variables either by exporting them directly, or by copying the .env.template
file to .env
and filling out as necessary
Tip
You can omit OTP from the the .env file if you'd like to pass the OTP from the command line like so: OTP=123123 docker compose run
docker compose build
docker compose run
Variable | Description | Required |
---|---|---|
PUPPETEER_HEADLESS |
run puppeteer in headless mode | no (default false) |
PUPPETEER_ARGS |
additional arguments for puppeteer | no |
- If you are on arm64 (i.e. a Mac with an Apple Silicon chip) you must add
--platform linux/x86_64
when running yourdocker run
anddocker build
- In Docker
--manualAuth
does not work unless you disable 'headless mode', you must provide credentials via env
to disable 'headless' mode for debugging (NOTE: this works on linux, untested on MacOS)
- edit
.env
, and addDISPLAY: "$DISPLAY" PUPPETEER_HEADLESS: "false"
- edit
docker-compose.yml
, and add this line to 'volumes:'
- /tmp/.X11-unix/:/tmp/.X11-unix
- authorize Docker to talk to the local X server
xhost +local:docker
- run the container again