Awx Docker Image

2/12/2022by admin

Deploying AWX: 1. Login to CentOS 7 server where you would like to host AWX. Perform the docker test to ensure docker is functional and verify that system has internet access to pull the required images. [email protected] awx# docker run -it hello-world Unable to find image 'hello-world:latest' locally Trying to pull repository docker. As part of that last project, I have published two public Docker Hub images, awxweb and awxtask, which can be used with a docker-compose.yml file to build AWX locally in about as much time as it takes to download the Docker images. Posted: (5 days ago) Sep 23, 2018 # docker images REPOSITORY TAG IMAGE ID CREATED SIZE ansible/awxtask latest 5290f9b3268c 2 days ago 1.48GB postgres 9.6 106bdfb062df 8 weeks ago 235MB › Images detail: Show All Images.

Table of Contents

In a previous post I wrote about setting up Ansible AWX using a docker environment.

This used Ansible to read in an inventory file, dynamically generate scripts which stored environment variables as well as an overall docker-compose file.

In this post I shall include further details on the files generated using the Ansible approach of setting up AWX.

Then use docker-compose to create the AWX environment.

Files generated using Ansible

Awx Docker Images

When running Ansible to setup AWX. The following files are generated.

  2. docker-compose.yml
  4. nginx.conf

As these hold environment specific details you will need to modify these files first to match your environment setup.

These files were generated using the stock inventory file -

The inventory file tells Ansible where to store the following files. This is identified by the following line.

A user’s home directory under a hidden directory called .awx




It’s very important that this stay the same between upgrades or you will lose the ability to decrypt your credentials


In the example below some of the volumes require changing.


  • /volume1/docker-data = should match the path to where you would want to host static AWX projects (rather than remotely via a Git repository) * ~/.awx/awx-compose = should match the location where you have all your files
Awx docker images


If you were using nginx then the awx_web docker container makes use of this conf file.

Awx Docker Image

Using docker-compose

Once you have validated that the files shown above are correct and match your environment.

This assumes you have all the files stored within your home directory


Docker containers

This will setup and run the 5 docker containers.

  1. awx_web
  2. awx_task
  3. awx_postgres
  4. awx_memcached
  5. awx_rabbitmq

AWX is the upstream open-source version of Ansible Tower which is free.

Latest repo:

Unlike Tower, there is no support from RedHat. If you want a supported version, consider buying Ansible Tower. Even if you plan to buy Ansible Tower, AWX is a fantastic way to 'try before you buy'. You might also realise you don't need to spend the dough to get what you want, depending on your needs.

Install AWX 17.0.1 in Docker on Ubuntu 20.04

We're going to be installing AWX 17.0.1 on an Ubuntu Desktop 20.04 running within VMWare workstation

Full install instructions can always be found here –

Starting from a clean Ubuntu 20.04 installation, start by updating the packages.

Install VMWare tools, net-tools, Git SSH and Virtualenv.

Setup Virtual Environment

Create a directory called virtual and then create a virtual environment within that directory called awx.

Activate the virtual environment.

Aws Docker Image

Your prompt should now change to (awx) [email protected]:~/virtual$

Install Docker

Check Docker version.

Install Docker Compose

Then install docker-compose, in doing so it will also install Docker, which is another requirement.

Ansible Awx Docker Image

Clone the AWX repository from GitHub, make sure you go to your home directory before doing this otherwise you will get an error saying the folder awx already exists.

Ansible/awx_web Docker Image

Edit the Inventory file

You now have a folder called awx and within there a folder called installer and within there an inventory file you need to edit.

You just need to make sure you have set an admin password and we need to change the directory of your virtual environment.

Uncomment and change # admin_password=password to your password like so

Find the AWX custom virtual environment folder. Only usable for local install.

custom_venv_dir=/opt/my-envs/ and change the path to /home/joakimnordin/virtual/awx but make sure you change to your username, not my username obviously.

Awx Docker Image Download

Install Ansible

To build AWX you need to have Ansible installed to run the install playbook, so make sure you are in your virtual environment and run

Run the install Playbook

Awx Docker Image Example

If everything went well, it should now be working.

This will take a little while to run through as it must pull some images from Docker, but once it completes you should be able to type docker ps and see your running containers like so.

At this point you can to your servers IP and login:

Comments are closed.