AWX (Built with Ansible Container)
This project is in its early stages. There will be bugs!
This project is composed of three main parts:
- Ansible Container project: This project is maintained on GitHub: geerlingguy/awx-container. Please file issues, support requests, etc. against this GitHub repository.
- Docker Hub Image: If you just want to use
geerlingguy/awx_taskin your project, you can pull it from Docker Hub.
- Ansible Role: If you need an Ansible role to build AWX, check out
geerlingguy.awxon Ansible Galaxy. (This is the Ansible role that does the bulk of the work in managing the AWX container.)
Currently maintained versions include:
latest: AWX 1.x
latest: AWX 1.x
Quickstart - Standalone Usage with Docker Compose
If you just want to get an AWX environment running quickly, you can use the
docker-compose.yml file included with this project to build a local environment accessible on
mkdir awx-test && cd awx-test curl -O https://raw.githubusercontent.com/geerlingguy/awx-container/master/docker-compose.yml docker-compose up -d
The Docker Compose file uses community images for
memcached, and the following images for AWX:
After the initial database migration completes (this can take a few minutes; follow the progress with
docker logs -f [id-of-awx_task-container]), you will be able to access the AWX interface at
http://localhost/. The default login is
Note: Switch the image for the
docker-compose.ymlif you want to use the
geerlingguy/maintained images rather than the ones from
ansible/. If you're just kicking AWX's tires though, stick with the defaults.
Management with Ansible Container
Before using this project to build and maintain AWX images for Docker, you need to have the following installed:
Build the AWX images
Typically, you would build the images as specified in the
container.yml file using
ansible-container --var-file config.yml build, but in this case, since there are many dependencies bundled in the AWX repository, we will build the Docker images using a helper playbook:
$ cd prebuild/ $ ansible-galaxy install -r requirements.yml --force $ ansible-playbook -i 'localhost,' -c local prebuild.yml
After this playbook runs, you should see two new Docker images (which we'll use in the Ansible Container definition):
$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE awx_task devel 26311794058d 29 seconds ago 938MB awx_web devel 3d38dccc9190 58 seconds ago 913MB
A Vagrantfile is included with this project to assist in building a clean environment with all the dependencies required to build the AWX images (in case you don't want to install everything on your local workstation!). To use it:
- Wait for Vagrant's provisioning to complete (it will run
- Log in with
vagrant sshand use
Build the conductor
Build the conductor using
ansible-container --var-file config.yml build
Note: If you get any permission errors trying to generate a Docker container, make sure you're either running the commands as root or with sudo, or your user is in the
sudo usermod -G docker -a [user], then log out and log back in).
Run the containers
ansible-container --var-file config.yml run
You should be able to reach AWX by accessing http://localhost/ in your browser.
stop to stop the container, and
destroy to reset the containers and all images.)
Push the containers to Docker Hub
Currently, the process for updating this image on Docker Hub is manual. Eventually this will be automated via Travis CI using
ansible-container push (currently, this is waiting on this issue to be resolved).
Log into Docker Hub on the command line:
docker login --username=geerlingguy
Tag the latest version (only if this is the latest/default version):
docker tag awx_web:devel geerlingguy/awx_web:latest docker tag awx_web:devel geerlingguy/awx_web:1.x docker tag awx_task:devel geerlingguy/awx_task:latest docker tag awx_task:devel geerlingguy/awx_task:1.x
Push tags to Docker Hub:
docker push geerlingguy/awx_web:latest # (if this was just tagged) docker push geerlingguy/awx_web:1.x [etc...]
MIT / BSD