Docker Image with Pre-Configured Unrar

Several Docker images come pre-configured with unrar, ranging from simple, lightweight command-line utilities to automated extraction daemons for media servers. Because the original RAR extraction algorithm is proprietary, standard base operating system images do not include unrar out of the box, but the open-source community maintains ready-to-use containers on Docker Hub to fill this gap.

Available Pre-Configured Images

If you need a dedicated, maintained CLI tool, community images such as crazymax/unrar provide unrar built on top of Alpine Linux. These images are lightweight (often under 20MB) and designed for single-command execution or automated scripts.

To run a pre-configured unrar container against files in your current working directory, you can mount your host directory into the container:

docker run --rm -v "$(pwd):/files" crazymax/unrar x /files/archive.rar /files/extracted/

Automated Extraction Containers

If your goal is to continuously watch a folder and automatically extract RAR archives (commonly used with torrent or Usenet workflows), dedicated automation images are preferred:

  • Unpackerr (golift/unpackerr): A lightweight container designed to integrate directly with applications like Sonarr, Radarr, and Lidarr to extract archives immediately upon download completion.
  • Extraction-watcher scripts: Various lightweight Alpine-based containers run background loops with unrar installed to monitor input directories.

Creating a Minimal Custom Alternative

Because pulling unknown third-party images can pose security risks, you can build your own minimal unrar image using a three-line Dockerfile.

In Alpine Linux, the unrar package is available in the non-free repository:

FROM alpine:latest
RUN apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/non-free unrar
ENTRYPOINT ["unrar"]

Build the image locally:

docker build -t local-unrar .

You can then run docker run --rm -v "$(pwd):/data" -w /data local-unrar x archive.rar whenever archive extraction is required.