mirror of
https://github.com/birbwatcher/wayback-machine-downloader.git
synced 2026-02-10 06:42:59 +00:00
feat: added docker file
This commit is contained in:
46
README.md
46
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
|
||||
|
||||
BIN
assets/.DS_Store
vendored
Normal file
BIN
assets/.DS_Store
vendored
Normal file
Binary file not shown.
13
wayback-machine-downloader/dockerfile
Normal file
13
wayback-machine-downloader/dockerfile
Normal file
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user