Docker
hunt's image, ghcr.io/arabesquelabs/hunt, is small: no shell, and it runs
as a non-root user. It listens on :4848, keeps its SQLite database in
/data (a volume), and answers /healthz once its database does.
Requirements
- Docker
- Docker Compose, to run it from a compose file (optional)
1. Run it
docker run -d --name hunt --restart unless-stopped \
-p 127.0.0.1:4848:4848 -v hunt-data:/data \
ghcr.io/arabesquelabs/hunt:latest
Or with Docker Compose: save this as compose.yaml, and run
docker compose up -d beside it.
services:
hunt:
image: ghcr.io/arabesquelabs/hunt:latest
ports: ["127.0.0.1:4848:4848"]
volumes: ["hunt-data:/data"]
restart: unless-stopped
volumes:
hunt-data:
Your data is in the hunt-data volume, and stays when the container is
replaced.
2. Open it
Visit http://localhost:4848. 127.0.0.1:4848 keeps hunt to this computer.
Before opening it to a network (-p 4848:4848), give it a password
(-e HUNT_PASSWORD=…), or put a sign-in in front of it: see "What's
public, and what needs signing in".
3. Choose a version (optional)
latest is main's newest build. Each release is also tagged with its
version (v0.15.0), and each build with its commit (sha-…): use one of
those to choose when you upgrade.
4. Use PostgreSQL or MySQL (optional)
Give the container the database's address as HUNT_DB
(-e HUNT_DB=postgres://hunt:secret@db/hunt): see "The database".
Updating
docker pull ghcr.io/arabesquelabs/hunt:latest
docker rm -f hunt # the data stays, in its volume
Then run it again, as in step 1. With Compose:
docker compose pull && docker compose up -d. A newer hunt upgrades a
SQLite database in place.
Building the image yourself
docker build --platform linux/amd64 -t hunt .
docker run -p 127.0.0.1:4848:4848 -v hunt-data:/data hunt
The image workflow (.github/workflows/image.yml) runs make ci, then
publishes ghcr.io/arabesquelabs/hunt (latest from main, v<version>,
and each commit's sha), so you needn't build it yourself.
Builds reuse what they can. The Dockerfile builds hunt's dependencies in a layer of their own, from cargo-chef's recipe (what hunt depends on, without its own version), and the workflow keeps layers in GitHub's Actions cache. A code change or a release (a new version) only compiles hunt itself; changing the dependencies compiles them again. The cache holds 10 GB per repository, so an occasional full build after old entries are evicted is expected.