Skip to content

ArchiveBox/docker-archivebox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-archivebox

The official Docker image for ArchiveBox, the self-hosted internet archiving solution.

https://hub.docker.com/r/archivebox/archivebox

docker pull archivebox/archivebox

# using Docker Compose
mkdir -p ~/archivebox/data && cd ~/archivebox
curl -fsSL 'https://docker-compose.archivebox.io' > docker-compose.yml
docker compose up

# using Docker:
mkdir -p ~/archivebox/data && cd ~/archivebox/data
docker run -v $PWD:/data -it archivebox/archivebox init

Tags available

It's recommended to use :latest (stable, cross-platform build for all supported architectures)

  • :latest (the default stable tag, 1:1 with :stable/:master)
  • :dev/:main/:<branchname> (tags for each git branch, use these to try a BETA or specific PR)
  • sha-2c7be14/:sha-<commitid> (tags for each git commit, use these to pin an exact codebase version)

For a full list of the published images: https://hub.docker.com/r/archivebox/archivebox/tags

Docker Hub Screenshot

✅ Operating Systems Supported

Linux, macOS, Windows

Any OS where Docker or Docker Desktop is supported.

✅ CPU Architectures Supported

  • amd64 all x86 64-bit Intel/AMD processors
  • arm64/aarch64 Raspberry Pi v4+, M1 or newer Macs, and newer ARM-based systems (>= ARM v8)

❌ CPU Architectures NOT Supported

  • i386 x86 32-bit Intel/AMD processors
  • arm/v7/arm/v6/arm/v5 Raspberry Pi v3 and older ARM systems
  • riscv64/riscv32/ppc64le/ppc32/s390x or other architectures

Docker Compose Usage

See full docker-compose.yml and the Docker ArchiveBox docs for more complete examples and documentation.

services:
    archivebox:
        image: archivebox/archivebox:dev
        ports:
            - 8000:8000
        environment:
            # add any ArchiveBox config options you want here
            - ALLOWED_HOSTS=archivebox.example.com
            - ADMIN_USERNAME=admin
            - ADMIN_PASSWORD=...
            - MEDIA_MAX_SIZE=750m
        volumes:
            - ./data:/data

Dockerfile Usage

FROM python:3.12-slim

WORKDIR /data
RUN pip install archivebox==0.8.5rc44
RUN archivebox install

RUN useradd -ms /bin/bash archivebox && chown -R archivebox /data

(replace 0.8.5rc44 with latest release)

See more:

  • Dockerfile: Full production-ready image with optimized build caching and layer sizes
  • Dockerfile.simple: Simple example of how to add ArchiveBox to your own Dockerfile

Kubernetes

(BETA: Advanced users only, ArchiveBox does not test releases on Kubernetes, but it should work in theory)

./archivebox.yml contains an example Kubernetes manifest (with rook-ceph-rbd and metallb).

Use as-is, or edit to your needs, objects will be created in namespace: archivebox.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: archivebox-deployment
spec:
  selector:
    matchLabels:
      app: archivebox
  replicas: 1
  template:
    metadata:
      labels:
        app: archivebox
    spec:
      containers:
        - name: archivebox
          args: ["server", "--quick-init", "0.0.0.0:8000"]
          image: archivebox/archivebox
          ports:
            - containerPort: 8000
              protocol: TCP
              name: http
          volumeMounts:
            - mountPath: /data
              name: archivebox
      restartPolicy: Always
      volumes:
        - name: archivebox
          persistentVolumeClaim:
            claimName: archivebox
# run this to apply the configuration
kubectl apply -f archivebox.yml

Development

The image is built using docker: https://docs.docker.com/get-docker/ and hosted on Docker Hub & Github Packages: https://hub.docker.com/r/archivebox.

https://hub.docker.com/r/archivebox/archivebox

The config file / package definition is here: ArchiveBox/Dockerfile.

To build this package, make sure you are in the ArchiveBox main repo first.

cd ArchiveBox/
git pull --recurse-submodules

# Build the docker image
./bin/build_docker.sh

# Push the image to Docker Hub & Github Packages
docker login
./bin/release_docker.sh 0.7.1 latest

Inspecting the image layers

docker image ls archivebox/archivebox

docker image inspect <image id>  # view image details
docker image history <image id>  # view image layer sizes

Please note: The old image at nikisweeting/archivebox is deprecated, use archivebox/archivebox instead.