AnsiblePilot — Master Ansible Automation
AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,100 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 "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example" published by Apress, 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.
Run and Stop AWX in Docker Containers: Start, Stop & Manage (Guide) — Video Tutorial
How to run and stop Ansible AWX in Docker containers. Start, stop, restart AWX services, check logs, and troubleshoot common Docker deployment issues.
What You'll Learn
- How to Run and Stop Ansible AWX in Docker container?
- Links
- Playbook
- code
- Access the Ansible AWX Web UI
- Access the Ansible AWX Web API
- Conclusion
- Start AWX
- Stop AWX
- Restart AWX
Full Tutorial Content
How to Run and Stop Ansible AWX in Docker container?
I'm going to show you how to start and stop the Ansible AWX in Docker containers.
You can take advantage of the AWX 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.
Links
- https://github.com/ansible/awx/blob/devel/tools/docker-compose/README.md#run-awx
Playbook
How to Run and Stop Ansible AWX in Docker containers.
This requires Building from scratch Ansible AWX for Docker containers in a previous lesson.
code
Once you have a successful build of Ansible AWX for Docker containers, you can run the AWX container using the following command.
The process is also spinning the requirements of PostgreSQL and Redis containers.
```bash
$ make docker-compose
```
Your session will be attached to the AWX container, and start watching for log messages and events in real-time when the container was launched.
The first time you start the environment, database migrations run in order to build the PostgreSQL initial database schema and data.
By default, six Docker containers are running on your machine: `tools_awx_1`, `tools_postgres_1`, `tools_redis_1`, `tools_receptor_hop`, `tools_receptor_1`, `tools_receptor_2`.
You can verify the containers running in your system using the `docker ps` command:
```bash
[lberton@ansible awx]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bce34be76a94 ghcr.io/ansible/awx_devel:HEAD "/entrypoint.sh rece…" 14 hours ago Up 2 minutes 22/tcp, 8013/tcp, 8043/tcp, 8080/tcp tools_receptor_2
c11c7c1114f1 ghcr.io/ansible/awx_devel:HEAD "/entrypoint.sh rece…" 14 hours ago Up 2 minutes 22/tcp, 8013/tcp, 8043/tcp, 8080/tcp tools_receptor_1
05589a6b6185 quay.io/ansible/receptor:devel "/usr/local/bin/dumb…" 14 hours ago U
About This Tutorial
- Author: Luca Berton
- Difficulty: Beginner
- Read time: 5 min
- Category: troubleshooting
Read the full written article: Run and Stop AWX in Docker Containers: Start, Stop & Manage (Guide)
Related Video Tutorials
- Build Ansible AWX in Docker Containers Easily — 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.
- 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 examples.
- 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 (K8s)
- What is Ansible AWX? Open-Source Automation Platform Guide — What is Ansible AWX? Understand the open-source automation platform. Compare AWX vs AAP, explore features, architecture, and use cases for enterprise automation.
- Ansible uri Module: REST API Requests (GET, POST, PUT, DELETE) — How to interact with REST APIs using Ansible uri module. Send GET, POST, PUT, DELETE requests, handle authentication, parse JSON responses with examples.
- Ansible Playbook: POST Request and Token Retrieval Demo — Use Ansible to send a POST request and retrieve a token from a server. Learn to automate login processes with Ansible's URI module.