tool-containers
Menu
GitHub (opens in new tab)

Run Omnigent with Docker

run.sh runs Omnigent on the current directory, passing any arguments to omnigent. airgapped.run.sh does the same from a saved image on a host that cannot pull.

Images
  • GHCRghcr.io/hambn/omnigent
  • Docker Hubdocker.io/hambn/omnigent
Use case
Orchestrate agents over a local checkout
Upstream
github.com/omnigent-ai/omnigent (opens in new tab)
Source
tools/ai/omnigent/docs/docker (opens in new tab)
On this page

Prerequisites

  • Docker Engine 23 or later.
  • A model credential, such as ANTHROPIC_API_KEY or OPENAI_API_KEY.

Run Omnigent

On first run, Omnigent offers the model credentials it finds in the environment. run.sh passes none, so add -e ANTHROPIC_API_KEY or -e OPENAI_API_KEY to its docker run line, then:

Shell
export ANTHROPIC_API_KEY=sk-ant-...
./run.sh                 # pick a model and start a session
./run.sh claude          # start a session in one agent, here Claude Code

Omnigent keeps its settings and history in /home/sysadmin/.omnigent, which is removed with the container. Its web UI listens on port 6767 inside the container; run.sh publishes no ports, so use the terminal session.

Run without registry access

On a machine that can pull, save the image:

Shell
docker save ghcr.io/hambn/omnigent:ubuntu-browser -o omnigent.tar

Copy the tar to the offline host and pass its path first; the remaining arguments go to omnigent:

Shell
./airgapped.run.sh omnigent.tar

The script loads the tar and runs OMNIGENT_IMAGE with --pull=never. The agents still need network access to their model providers.

Variables

Variable Required Purpose
OMNIGENT_IMAGE no Image both scripts run. Defaults to ghcr.io/hambn/omnigent:ubuntu-browser; set ghcr.io/hambn/omnigent@sha256:<digest> to pin one build.

Workspace

The current directory is mounted at /workspace, the image's working directory. Omnigent and the agents it starts run as sysadmin (UID 1000), so new files belong to UID 1000 on the host.

Files

  • run.sh pulls the image if needed and runs omnigent with your arguments.
  • airgapped.run.sh loads a saved tar and runs it without pulling.

File contents

airgapped.run.sh17 lines
#!/usr/bin/env bash
# Offline host: load the image from a tar saved on an online host, never pull.
#   docker save ghcr.io/hambn/omnigent:ubuntu-browser -o omnigent.tar
set -euo pipefail

image=${OMNIGENT_IMAGE:-ghcr.io/hambn/omnigent:ubuntu-browser}
tar=${1:-omnigent.tar}
shift $(($# > 0 ? 1 : 0))
[[ -f "$tar" ]] || {
    echo "missing $tar; docker save it on an online host first" >&2
    exit 1
}

docker load -i "$tar"
docker run -it --rm --pull=never \
    -v "$PWD:/workspace" \
    "$image" "$@"
run.sh8 lines
#!/usr/bin/env bash
# Run Omnigent against the current directory.
set -euo pipefail

image=${OMNIGENT_IMAGE:-ghcr.io/hambn/omnigent:ubuntu-browser}
docker run -it --rm \
    -v "$PWD:/workspace" \
    "$image" "$@"

Topics