Back to Dashboard

ansible

14.3.1-ubuntu

Pre-installed common collections, multi-version retention, ARM-native (amd64 + arm64). Daily upstream version monitoring with auto-PRs.

Trust posture

📋 SBOM ATTESTED🛡 TRIVY: 2 CRITICAL (advisory) · SCANNED 2026-08-29🏗 AMD64 + ARM64 🔗 6/6 deps tracked daily 🔍 REPRODUCE THESE CHECKS LOCALLY
PULLS 11.6K 8277 to 11643 pulls across 30 recorded days 2026-08-02: 8277 pulls2026-08-03: 8281 pulls2026-08-04: 8567 pulls2026-08-05: 8640 pulls2026-08-06: 8654 pulls2026-08-07: 8654 pulls2026-08-08: 8664 pulls2026-08-09: 8683 pulls2026-08-10: 8702 pulls2026-08-11: 8726 pulls2026-08-12: 8818 pulls2026-08-13: 9058 pulls2026-08-14: 9110 pulls2026-08-15: 9254 pulls2026-08-16: 9613 pulls2026-08-17: 9693 pulls2026-08-18: 9706 pulls2026-08-19: 9932 pulls2026-08-20: 9938 pulls2026-08-21: 10161 pulls2026-08-22: 10377 pulls2026-08-23: 10387 pulls2026-08-24: 10475 pulls2026-08-25: 10482 pulls2026-08-26: 10867 pulls2026-08-27: 10901 pulls2026-08-28: 10906 pulls2026-08-30: 11630 pulls2026-08-31: 11643 pulls2026-09-01: 11643 pulls
STARS 0

VERIFIABLE TRUST ARTIFACTS

Provenance

Build commit
8a8b07b
Build digest
sha256:49e2e71777518fea3e4f5d54575abff987221fce070c5f932b0f3829a62d06a2
Index digest
sha256:c51d11037cbc494b805f1846859140101c1dc28b4e1b284d174cbeb34f38dcbb
Manifest digest (amd64)
sha256:47e32785253d39200aae06e1bfdc3338d50957acde65bc14eb6bf412b4f5ce52
Manifest digest (arm64)
sha256:0ffbf2a2f4c8b6d0fe428dea724ffbe8c525c64a2f5883a111e1c2d4a851fd64
SBOM attestation
43788995…
Trivy last scan
2026-08-29 00:48 UTC
Base image
Verify
gh attestation verify oci://ghcr.io/oorabona/ansible:14.3.1-ubuntu --owner oorabona guide →

Security scan results

Trivy · last scan 2026-08-29

Last scan: (advisory mode — Trivy runs continue-on-error in CI; we surface findings, we do not block builds on them).

2Critical
20High
57Medium
10Low
0Info

Top advisories (upstream, advisory)

  • CVE-2026-53910 (WARNING) — ansible — diffutils: heap‑based buffer overflow due to multiple signed integer overflows in line‑mapping calculations
  • CVE-2026-75803 (NOTE) — ansible — Issue summary: ChaCha20-Poly1305 and AES-OCB decryption with an empty ...
  • CVE-2026-75803 (NOTE) — ansible — Issue summary: ChaCha20-Poly1305 and AES-OCB decryption with an empty ...
  • CVE-2026-75803 (NOTE) — ansible — Issue summary: ChaCha20-Poly1305 and AES-OCB decryption with an empty ...
  • CVE-2026-73073 (WARNING) — ansible — Vim is an open source, command line text editor. Prior to 9.2.0845, St ...

→ Full report via gh api — see Verify Images.

Explore

Build lineagesha256:
Build Lineage
Build Digest sha256:49e2e71777518fea3e4f5d54575abff987221fce070c5f932b0f3829a62d06a2
Base Image
OS_VERSION latest
PYASN1_VERSION 0.6.4
PARAMIKO_VERSION 5.0.0
CFFI_VERSION 2.1.1
CRYPTOGRAPHY_VERSION 50.0.1
PYCRYPTODOME_VERSION 3.23.0
PYNACL_VERSION 1.6.2
Package summary n/a — runtime parsed
Recent changes n/a — runtime parsed
Build history n/a — runtime fetched
Dependency health all up to date

Dependency Health

all up to date
6/6 dependencies monitored
Up-to-date dependencies
PYASN1_VERSION 0.6.4 PARAMIKO_VERSION 5.0.0 CFFI_VERSION 2.1.1 CRYPTOGRAPHY_VERSION 50.0.1 PYCRYPTODOME_VERSION 3.23.0 PYNACL_VERSION 1.6.2

Documentation

README

Ansible

Production-ready Ansible automation container built from source with Python virtual environment isolation and automatic dependency monitoring. Runs as non-root user with multi-mode entrypoint support.

Docker Hub GHCR Build

Verify this image

Every build ships a Sigstore-signed SBOM and a full Trivy scan — verify them yourself, no login required:

gh attestation verify oci://ghcr.io/oorabona/ansible:latest --owner oorabona

Full walkthrough (SBOM payload, Trivy findings, multi-arch manifest inspection, upstream dependency tracking) → https://oorabona.github.io/docker-containers/verify-images/

Quick Start

# Pull from GitHub Container Registry
docker pull ghcr.io/oorabona/ansible:latest

# Or from Docker Hub
docker pull oorabona/ansible:latest

# Run a playbook
docker run --rm \
  -v ./playbooks:/playbooks:ro \
  -v ./inventory:/inventory:ro \
  -v ~/.ssh:/home/ansible/.ssh:ro \
  ghcr.io/oorabona/ansible playbook /playbooks/site.yml -i /inventory/hosts

# Check version
docker run --rm ghcr.io/oorabona/ansible ansible --version

Features

Core Capabilities

  • Python venv isolation: All Python packages installed in /opt/ansible-venv for clean separation
  • Multi-stage build: Build dependencies removed from final image for minimal size
  • Non-root execution: Runs as ansible user for security (with sudo access if needed)
  • Auto-reload: inotifywait monitors requirements.txt and requirements.yml for changes
  • Multi-mode entrypoint: Supports playbook execution, vault operations, script running, or direct command execution

Security Features

  • Non-root by default (user ansible with UID 1000)
  • Build dependencies stripped from runtime image
  • Ubuntu-based with regular security updates
  • Support for read-only filesystem and capability dropping

Development Features

  • Automatic Galaxy collection/role installation from requirements.yml
  • Automatic pip package installation from requirements.txt
  • File watching for hot-reload during development
  • Addon script support for custom initialization
  • Optional wait-before-exit for interactive debugging

Entrypoint Modes

The container supports multiple execution modes via the entrypoint:

1. Playbook Mode

Run an Ansible playbook:

docker run --rm \
  -v ./playbooks:/playbooks:ro \
  ghcr.io/oorabona/ansible playbook /playbooks/site.yml -i /inventory/hosts

2. Vault Mode

Interact with Ansible Vault:

docker run --rm \
  -v ./secrets:/secrets \
  ghcr.io/oorabona/ansible vault encrypt /secrets/password.yml

3. Run-Script Mode

Execute a shell script:

docker run --rm \
  -v ./scripts:/scripts:ro \
  ghcr.io/oorabona/ansible run-script /scripts/setup.sh

4. Default Mode

Execute any command directly:

docker run --rm ghcr.io/oorabona/ansible ansible-galaxy collection list
docker run --rm ghcr.io/oorabona/ansible ansible-inventory --list

Build Arguments

Argument Description Default
VERSION Ansible version to install latest
UPSTREAM_VERSION Raw version for pip (without suffix) Uses VERSION if not set
OS_VERSION Ubuntu base image version latest
PYASN1_VERSION pyasn1 package version 0.6.2
PARAMIKO_VERSION Paramiko SSH library version 4.0.0
CFFI_VERSION CFFI package version 2.0.0
CRYPTOGRAPHY_VERSION Cryptography library version 46.0.4
PYCRYPTODOME_VERSION PyCryptodome package version 3.23.0
PYNACL_VERSION PyNaCl package version 1.6.2

Example build with specific versions:

docker build \
  --build-arg VERSION=2.16.1 \
  --build-arg OS_VERSION=24.04 \
  --build-arg CRYPTOGRAPHY_VERSION=46.0.4 \
  -t ansible:2.16.1 .

Environment Variables

Variable Description Default
ADDONSCRIPT Path to custom initialization script (unset — no script runs)
WAIT_BEFORE_EXIT Wait for keypress before container exits (unset)
VIRTUAL_ENV Python virtual environment path /opt/ansible-venv
PATH Updated to include venv binaries /opt/ansible-venv/bin:$PATH

ADDONSCRIPT

The ADDONSCRIPT environment variable points to a script that runs before the main command. Use it for custom initialization:

services:
  ansible:
    image: ghcr.io/oorabona/ansible:latest
    environment:
      ADDONSCRIPT: /scripts/init-aws-credentials.sh
    volumes:
      - ./scripts:/scripts:ro

Nothing runs when it is unset or empty, which is the default. A value naming something that is not executable stops the container with a message. Anything executable is sourced — and note that a directory is executable, so a path that points at one is sourced, fails, and the container carries on: the check is a guard against a typo, not a validation of the script.

The image also carries /addon.sh, the example from this repository. It is not the default and nothing runs it unless you name it.

WAIT_BEFORE_EXIT

Useful for debugging or interactive sessions. Container will wait for Enter key before exiting:

docker run --rm -it \
  -e WAIT_BEFORE_EXIT=1 \
  ghcr.io/oorabona/ansible ansible-playbook /playbooks/debug.yml

Volumes

Path Purpose Recommended Mount
/home/ansible/playbook Working directory Read-only for playbooks
/home/ansible/.ansible Ansible collections and plugins Persistent volume
/home/ansible/.ssh SSH keys for remote connections Read-only, mode 600
/etc/ansible Ansible configuration Read-only override

Docker Compose Example

services:
  ansible:
    image: ghcr.io/oorabona/ansible:latest
    volumes:
      - ./playbooks:/playbooks:ro
      - ./inventory:/inventory:ro
      - ~/.ssh:/home/ansible/.ssh:ro
      - ansible_collections:/home/ansible/.ansible
    working_dir: /playbooks
    command: playbook site.yml -i /inventory/hosts

volumes:
  ansible_collections:

Hot-Reload with Requirements

The container automatically watches for changes to dependency files:

services:
  ansible:
    image: ghcr.io/oorabona/ansible:latest
    volumes:
      - ./playbooks:/playbooks:ro
      - ./requirements.yml:/home/ansible/playbook/requirements.yml:ro
      - ./requirements.txt:/home/ansible/playbook/requirements.txt:ro
      - ansible_collections:/home/ansible/.ansible
    command: playbook /playbooks/site.yml

volumes:
  ansible_collections:

When requirements.yml or requirements.txt changes, the container automatically installs updates.

Security

Base Security

  • Non-root by default: Runs as ansible user (UID 1000, GID 1000)
  • Multi-stage build: Build dependencies removed from final image
  • Ubuntu-based: Regular security updates from Canonical
  • Virtual environment: Python packages isolated from system packages

Runtime Hardening

services:
  ansible:
    image: ghcr.io/oorabona/ansible:latest
    read_only: true
    tmpfs:
      - /tmp
      - /run
    cap_drop:
      - ALL
    security_opt:
      - no-new-privileges:true
    volumes:
      - ./playbooks:/playbooks:ro
      - ./inventory:/inventory:ro
      - ~/.ssh:/home/ansible/.ssh:ro

SSH Key Security

  • Mount SSH keys as read-only (:ro)
  • Ensure proper permissions on host (mode 600 for private keys)
  • Use SSH agent forwarding when possible
  • Never store SSH private keys in container images
# Set proper permissions before mounting
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub

# Run with SSH agent forwarding (if supported by Docker setup)
docker run --rm \
  -v $SSH_AUTH_SOCK:/ssh-agent \
  -e SSH_AUTH_SOCK=/ssh-agent \
  -v ./playbooks:/playbooks:ro \
  ghcr.io/oorabona/ansible playbook /playbooks/site.yml

Secrets Management

Never hardcode secrets in playbooks. Use Ansible Vault or external secret management:

# Encrypt sensitive variables
docker run --rm -it \
  -v ./vars:/vars \
  ghcr.io/oorabona/ansible vault encrypt /vars/secrets.yml

# Run playbook with vault password
docker run --rm \
  -v ./playbooks:/playbooks:ro \
  -v ./vars:/vars:ro \
  -e ANSIBLE_VAULT_PASSWORD_FILE=/vars/.vault_pass \
  ghcr.io/oorabona/ansible playbook /playbooks/site.yml

Dependencies

All Python cryptography and SSH dependencies are pinned and monitored for updates via PyPI:

Dependency Version Type Purpose
pyasn1 0.6.2 PyPI ASN.1 types and codecs
Paramiko 4.0.0 PyPI SSH protocol implementation
cffi 2.0.0 PyPI C Foreign Function Interface
cryptography 46.0.4 PyPI Cryptographic recipes and primitives
pycryptodome 3.23.0 PyPI Cryptographic library (replaces deprecated pycrypto)
PyNaCl 1.6.2 PyPI Python bindings to libsodium

Dependency Monitoring

All dependencies are automatically monitored via the upstream monitoring workflow. When new versions are released on PyPI:

  1. Automated check detects new version
  2. Pull request created with version bump
  3. CI validates the build
  4. Merge triggers automatic container rebuild

Cryptography Stack

The container uses modern cryptographic libraries:

  • pycryptodome replaces the deprecated pycrypto package
  • PyNaCl provides libsodium bindings for modern cryptography
  • cryptography provides comprehensive cryptographic recipes
  • All packages compiled during build stage, only runtime files included in final image

Architecture

Supported platforms:

  • amd64 (x86_64)
  • arm64 (aarch64)

Built from source due to installation issues with pip on ARM platforms. Multi-stage build ensures minimal final image size.

Build Process

  1. Builder stage: Installs build dependencies (gcc, rustc, cargo), compiles Python packages in virtual environment
  2. Runtime stage: Copies only the virtual environment, installs runtime dependencies (Python, OpenSSH client, inotify-tools)
  3. Cleanup: Build dependencies and temporary files removed

Image Layers

ubuntu:{OS_VERSION}
├── Runtime packages (python3, openssh-client, inotify-tools, etc.)
├── Python venv (/opt/ansible-venv)
│   ├── ansible=={VERSION}
│   ├── cryptography=={VERSION}
│   ├── paramiko=={VERSION}
│   └── ... (all dependencies)
├── User setup (ansible user + sudo access)
└── Entrypoint scripts