From 64b8ff95d56e21f108359df133ecbd9fb9a99a52 Mon Sep 17 00:00:00 2001 From: User Date: Sun, 12 Oct 2025 13:31:49 +0200 Subject: [PATCH] feat: added docker file --- .DS_Store | Bin 6148 -> 6148 bytes README.md | 46 +++++++++++++++++++++++++- assets/.DS_Store | Bin 0 -> 6148 bytes wayback-machine-downloader/dockerfile | 13 ++++++++ 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 assets/.DS_Store create mode 100644 wayback-machine-downloader/dockerfile diff --git a/.DS_Store b/.DS_Store index 53efd372bfa05ff39d81579b005609ce2a9df5c1..78090dc8344a6cfb14b7908dec901658fdbf186e 100644 GIT binary patch delta 231 zcmZoMXfc=|#>B!ku~2NHo+2ar#(>?7iv?Ji7}+QDFzHLOF(fh+17Rvd2}5yGd2vBf zPJR*t1H+EVOw5Jq64lklCOQg+2Bx(-3e|?@re-<{mZk=^wVWKH%KFwp@!2`KdHG$F zXEMvnb^~>xm{t~Cl$VpAmktzXoNU2#l96OH8M`O%W3t%%ky({-Gdl-A2hbav8CkwF WPv#eKB)qu~2NHo+2ab#(>?7jI5J+So9}rvmRsIJ~@P?P))qL+DJ#i(9pbA zN1@u#+{{u(!P4BKww9AaR9W9TC_XzUH!r_)@*5U;#;(chSS>a`VpC<@*zl2QGdl-A d2hjA*f*jwOC-aLqaxee^BLf4=<_M8B%mAdCA-ezo diff --git a/README.md b/README.md index 1e9d243..34fa8de 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ Got ideas or suggestions? Feel free to open an issue! - [Special Features](#special-features) - [Requirements](#requirements) - [Installation](#installation) -- [Run](#run) +- [Run](#run) +- [Run in Docker](#run-in-docker-no-nodejs-installation-required) - [Example](#example) - [Common Issues](#common-issues) - [(Important) Download responsibly](#important-download-responsibly) @@ -98,6 +99,37 @@ After launching, an interactive menu will appear with the following questions: --- +# 🐳 Run in Docker (no Node.js installation required) + +You can also run the Wayback Machine Downloader inside a Docker container. +This allows you to use the tool without installing Node.js manually. + +### Go to the project directory +Open your terminal and navigate to the folder **where the Dockerfile is located**. +For example, if you cloned the repository: + +```bash +cd wayback-machine-downloader +``` + +### Build the image +```bash +docker build -t wayback-machine-downloader . +``` + +### Run interactively +```bash +docker run -it -v $(pwd)/websites:/app/websites wayback-machine-downloader +``` +### Explanation: +- `-it` — enables interactive input/output for the terminal (so you can answer questions). +- `-v $(pwd)/websites:/app/websites` — mounts the local `websites` folder so downloaded sites are saved on your machine. + +After running, the same interactive menu will appear as with the standard Node.js run. +All archived websites will be saved locally in the `./websites` directory. + +--- + ## Example ```bash @@ -128,6 +160,18 @@ After this, the archive download will begin. **Answer:** try specifying the base URL with `/*` at the end. For example: `https://example.com/*`, or try downloading a different time range. +#### Website restored with broken layout, but it looks fine on Web Archive + +1. You may have restored the website with absolute links. + This means it will only work correctly on its original domain and not when opened locally. + +2. Some **styles or assets might be hosted on another domain**, for example on a CDN. + In this case, make sure to select "rewrite links" and "download external assets" during setup. + The script will then also fetch resources from external domains. + +3. The website might rely on **JavaScript frameworks** (like Angular or React) for rendering. + In such cases, downloading will be more difficult and can take considerably longer. + --- ## (Important) Download responsibly diff --git a/assets/.DS_Store b/assets/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..23da3befaba61103d73412a644c59b384c16965d GIT binary patch literal 6148 zcmeH~KTpFz48@+JhUY&ZqLh^Z*^=*< z^VxUG8{!-QneW$^zzo2YuEe_zW7Bo@ksU=uNILh}VTDIL;T4-v_Thlmp5cx84VHuY zbF9&E8y_YsU zapsr`qynkHw*vZoD0F2F_D=hBaIh-?Ibqn0&vus}iw4LV?469z#7jvpmAGPvmor`> zuLgUkmqYAi?h_|V+)%_$XS`TCq&jm<1yX^b0>?g`Y5%{b|8oBy7Ue7zNCp0t0y0_L zF6Mlt=&hrd(_UNX_w+AguBCIZR!mwe=0scZ>5sgk&s?v;-f88GTRE9O0;)?|D)1Ky Fd;%f?AsGMw literal 0 HcmV?d00001 diff --git a/wayback-machine-downloader/dockerfile b/wayback-machine-downloader/dockerfile new file mode 100644 index 0000000..3a681f6 --- /dev/null +++ b/wayback-machine-downloader/dockerfile @@ -0,0 +1,13 @@ +FROM node:20-alpine + +WORKDIR /app + +COPY package*.json ./ +RUN npm install --production + +COPY . . + +CMD ["node", "downloader.js"] + +ENTRYPOINT ["node", "downloader.js"] +