willhallonline/docker-ansible
소개
Docker 컨테이너에서 Ansible을 실행합니다. Alpine, Ubuntu, Rocky Linux, Debian과 Ansible 2.21, 2.20, 2.19, 2.18 등을 지원하며, 이전 버전도 계속 지원합니다.
시스템 및 인프라측정된 스타 증가
- in 24h
- -1
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalDocker Ansible
Docker Ansible provides Ansible inside Docker for consistent running on your local machine or CI/CD system. You can view CHANGELOG to understand what changes have happened to this recently.
Visit the project documentation to make docker-ansible easier to use, extend, and contribute to.
Copilot Agents
- Image Matrix Maintainer keeps the Ansible Core image matrix consistent across Dockerfiles, workflows, published tags, and documentation.
- Build Failure Triager diagnoses Docker image matrix failures and recommends evidence-based next steps.
Current Ansible Core Versions
These are the latest Ansible Core versions running within the containers:
- Ansible 2.18: 2.18.20
- Ansible 2.19: 2.19.15
- Ansible 2.20: 2.20.11
- Ansible 2.21: 2.21.6
- Ansible 2.22: 2.22.0
- Older versions are provided within the unmaintained section, including 2.9, 2.10, 2.11, 2.12, 2.13, 2.14, 2.15, 2.16 and 2.17.
- More availability on Ansible versions on Ansible Release Documentation and Ansible-core to Python compatibility.
Supported tags and respective Dockerfile links
Immutable Images
There are a number of immutable images that are also being collected. To find a specific version of Ansible, look within the Docker Hub Tags. Each of the containers follow a similar pattern: Ansible-version-Base OS version.
Ansible Core (2.18, 2.19, 2.20, 2.21, 2.22)
This includes:
ansible-core(https://pypi.org/project/ansible-core/)ansible(https://pypi.org/project/ansible/)ansible-lint(https://pypi.org/project/ansible-lint/)
Current images generally publish AMD64 and ARM64 variants, but platform availability is specific to each tag. Ubuntu 24.04 is currently AMD64-only, and no ARMv7/32-bit ARM images are published. Alpine-based images are supported from Alpine 3.21 onward; older Alpine releases are listed in older-releases. Ansible Core 2.22 requires Python 3.13 or newer, so its images are limited to Alpine 3.24, Debian Trixie, Debian Trixie Slim, and Ubuntu 26.04.
| Base Image (↓) \ Ansible Version (→) | Dockerfile | 2.22 | 2.21 | 2.20 | 2.19 | 2.18 |
|---|---|---|---|---|---|---|
| Latest | Dockerfile | latest |
||||
| Alpine | Dockerfile | alpine |
||||
| Ubuntu | Dockerfile | ubuntu |
||||
| Alpine 3.21 | Dockerfile | 2.21-alpine-3.21 |
2.20-alpine-3.21 |
2.19-alpine-3.21 |
2.18-alpine-3.21 |
|
| Alpine 3.22 | Dockerfile | 2.21-alpine-3.22 |
2.20-alpine-3.22 |
2.19-alpine-3.22 |
2.18-alpine-3.22 |
|
| Alpine 3.23 | Dockerfile | 2.21-alpine-3.23 |
2.20-alpine-3.23 |
2.19-alpine-3.23 |
2.18-alpine-3.23 |
|
| Alpine 3.24 | Dockerfile | 2.22-alpine-3.24 |
2.21-alpine-3.24 |
2.20-alpine-3.24 |
2.19-alpine-3.24 |
2.18-alpine-3.24 |
| Bookworm (Debian 12) | Dockerfile | 2.19-debian-bookworm |
2.18-debian-bookworm |
|||
| Bookworm Slim (Debian 12) | Dockerfile | 2.19-debian-bookworm-slim |
2.18-debian-bookworm-slim |
|||
| Trixie (Debian 13) | Dockerfile | 2.22-debian-trixie |
2.21-debian-trixie |
2.20-debian-trixie |
2.19-debian-trixie |
2.18-debian-trixie |
| Trixie Slim (Debian 13) | Dockerfile | 2.22-debian-trixie-slim |
2.21-debian-trixie-slim |
2.20-debian-trixie-slim |
2.19-debian-trixie-slim |
2.18-debian-trixie-slim |
| Rocky Linux 10 | Dockerfile | 2.21-rockylinux-10 |
2.20-rockylinux-10 |
2.19-rockylinux-10 |
2.18-rockylinux-10 |
|
| Ubuntu 24.04 | Dockerfile | 2.21-ubuntu-24.04 |
2.20-ubuntu-24.04 |
2.19-ubuntu-24.04 |
2.18-ubuntu-24.04 |
|
| Ubuntu 26.04 | Dockerfile | 2.22-ubuntu-26.04 |
2.21-ubuntu-26.04 |
2.20-ubuntu-26.04 |
Older versions (2.9, 2.10, 2.11, 2.12, 2.13, 2.14, 2.15, 2.16, 2.17)
OS:
- Rockylinux 9
- Debian Bullseye
- Ubuntu 20.04
Ansible-core:
- Ansible 2.12: ...
- Ansible 2.13: 2.13.13
- Ansible 2.14: 2.14.18
- Ansible 2.15: 2.15.13
- Ansible 2.16: 2.16.19
- Ansible 2.17: 2.17.14
Various older versions are available in the older-releases documentation.
Running
Note: You will likely need to mount required directories into your container to make it run (or build on top of what is here).
Note: Containers run as the non-root
ansibleuser (UID/GID 1000) by default. Files written to mounted volumes will be owned by UID 1000, and SSH keys should be mounted into/home/ansible/.ssh/. If you need root inside the container (e.g. to install extra packages), pass--user roottodocker run.
Simple
docker run --rm -it willhallonline/ansible:latest /bin/sh
Mount local directory and ssh key
docker run --rm -it -v $(pwd):/ansible -v ~/.ssh/id_rsa:/home/ansible/.ssh/id_rsa willhallonline/ansible:latest /bin/sh
Injecting commands
docker run --rm -it -v $(pwd):/ansible -v ~/.ssh/id_rsa:/home/ansible/.ssh/id_rsa willhallonline/ansible:latest ansible-playbook playbook.yml
Bash Alias
You can put these inside your dotfiles (~/.bashrc or ~/.zshrc to make handy aliases).
alias docker-ansible-cli='docker run --rm -it -v $(pwd):/ansible -v ~/.ssh/id_rsa:/home/ansible/.ssh/id_rsa --workdir=/ansible willhallonline/ansible:latest /bin/sh'
alias docker-ansible-cmd='docker run --rm -it -v $(pwd):/ansible -v ~/.ssh/id_rsa:/home/ansible/.ssh/id_rsa --workdir=/ansible willhallonline/ansible:latest '
use with:
docker-ansible-cli
docker-ansible-cmd ansible-playbook playbook.yml
To accelerate using Mitogen look into Using Mitogen.
Maintainer
- Written and maintained by Will Hall
관련 프로젝트 살펴보기
불러오는 중…