AnsiblePilot — Master Ansible Automation
AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.
Popular Topics
About Luca Berton
Luca Berton is an Ansible automation expert, author of 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.
Build Ansible AWX in Docker Containers Easily — Video Tutorial
Learn to build and run Ansible AWX in Docker containers. Follow steps to set up AWX for local testing with Docker, including building base and receptor images.
What You'll Learn
- How to build Ansible AWX in Docker containers?
- Ansible AWX
- Links
- Playbook
- Conclusion
- Related Articles
Full Tutorial Content
How to build Ansible AWX in Docker containers?
AWX is the Open Source upstream project of the Ansible Automation Controller, included in the Ansible Automation Platform (formerly Ansible Tower).
Running in Docker containers to use the modern web-UI and API interface. Running in Docker containers is recommended only for experienced users and developers.
I’m Luca Berton and welcome to today’s episode of Ansible Pilot.
Ansible AWX
Ansible AWX supports only the x86_64 operating system:
- Fedora (maintained versions)
- Ubuntu LTS (20.04 or 22.04)
- Red Hat Enterprise Linux 8+, CentOS Stream 8+
- macOS 11
Ansible AWX is the upstream project of Ansible Automation Controller (formerly Ansible Tower), providing a modern web-UI and API interface to manage Ansible Playbooks, inventories, Credentials, and Vaults between your team in your organization.
Running AWX in local Docker containers allows you to test the AWX web-UI and API to manage Ansible Playbook execution easily. AWX run on Docker is considered for Testing or Development only; the preferred way is via the AWX Operator since version 18.0. This initial configuration sometimes is a roadblock for some Ansible AWX users.
Links
- [Installing AWX](https://github.com/ansible/awx/blob/devel/INSTALL.md)
Playbook
How to Build Ansible AWX in Docker containers.
I’m going to show you how to build the latest Ansible AWX in the latest Fedora using Docker containers and the latest receptor image.
The additional software must be installed:
- OpenSSL library
- Ansible
- Docker
Please note that the latest Docker technology should be installed in the target system, the Docker service must be started, and the current user added to the docker group. Also, the latest docker-compose Python module must be installed for a successful installation.
How to build the Ansible AWX Base Container Image and download the latest Ansible Receptor Image.
Clone the latest stable tag Ansible AWX repository
```bash
git clone -b x.y.z https://github.com/ansible/awx.git
```
Substitute **x.y.z** with the latest release version number (for example, 21.5.0).
Configure the inventory (optional)
You can customize the inventory parameters pg_password, broadcast_websocket_secret, secret_key, and any other settings you need for your deployment.
The Ansible AWX Base Container Image
build the AWX Base Container Image.
```bash
$ make docker-compose-build
```
This command builds the AWX base container image (it takes a while and connects to the internet to download dependencies, packages, and libraries).
After successful execution the docker images the command shows you a new ansible/awx_devel image:
```bash
[lberton@ansible awx]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ghcr.io/ansible/awx_devel HEAD 4d593fc25fc2 21 hours ago 1.8GB
```
2. The Ansible Receptor Image
Download the Receptor Image
The process also downloads the latest devel image from the receptor. V
About This Tutorial
- Author: Luca Berton
- Difficulty: Beginner
- Read time: 3 min
- Category: installation
Read the full written article: Build Ansible AWX in Docker Containers Easily
Related Video Tutorials
- Create Ansible AWX Superuser in Docker: Admin Account Setup (Guide) — How to create an AWX superuser admin account in Docker containers. Reset passwords, manage users, and troubleshoot AWX authentication with step-by-step.
- Run and Stop AWX in Docker Containers: Start, Stop & Manage (Guide) — How to run and stop Ansible AWX in Docker containers. Start, stop, restart AWX services, check logs, and troubleshoot common Docker deployment issues.
- Install Ansible AWX Operator for Kubernetes (K8s) and OpenShift (OCP) - Ansible AWX — How to deploy the latest Ansible AWX Operator in your local Red Hat OpenShift Local (formerly Red Hat CodeReady Containers), fully compatible with Kubernetes.
- Ansible Playbook for Installing Docker on Linux Systems — Learn how to install Docker on Linux systems using an Ansible playbook. Follow our guide for a seamless Docker setup and start process.
- Deploy Apache HTTPD with Podman Using Ansible Playbook — Automate Apache HTTPD deployment in a Podman container with Ansible. Manage Podman installation, image pulling, and container configuration.
- Deploy Apache HTTPD Container with Podman via Ansible — Automate the deployment of Apache HTTPD in a Podman container using Ansible. Set up web root, custom index.html, and manage container settings.