# Dockerized the AWX application

**URL:** <https://forum.ansible.com/t/dockerized-the-awx-application/37111>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [September 16, 2022, 12:45pm UTC](https://forum.ansible.com/t/dockerized-the-awx-application/37111 "2022-09-16T12:45:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![neha0021997](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@neha0021997](https://forum.ansible.com/u/neha0021997)\
**Post date:** [September 16, 2022, 12:45pm UTC](https://forum.ansible.com/t/dockerized-the-awx-application/37111/1 "2022-09-16T12:45:36Z")

</div>

Hi Team,

I have installed the AWX using Minikube cluster in my local. I have followed the basic installation steps using this link: [https://github.com/ansible/awx-operator](https://github.com/ansible/awx-operator)

Now, as next step I wanted to dockerize this application (to create a Dockerfile), so that it can be delploy in the cloud environment. Could you please give me the suggestion or any steps that how I can proceed further here

Thanks & Regards

Neha Singh

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [September 16, 2022, 5:44pm UTC](https://forum.ansible.com/t/dockerized-the-awx-application/37111/2 "2022-09-16T17:44:18Z")

</div>

We recommend spinning up a k8s cluster using GKE (or similar cloud provider) and use the awx-operator to deploy AWX there.

We do have docker based deployments, but this is intended for development or testing purposes only. The documentation for setting that up is here [https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md](https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md)

AWX Team

---

<div class="post-metadata">

**Author:** ![neha0021997](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@neha0021997](https://forum.ansible.com/u/neha0021997)\
**Post date:** [October 4, 2022, 9:08am UTC](https://forum.ansible.com/t/dockerized-the-awx-application/37111/3 "2022-10-04T09:08:28Z")

</div>

Hi Team,

I checked the given link. But I am not sure, this is something I am looking for. I wanted to create a dockerfile (then build the same and push into dockerhub or other registry). then that pushed image (from registry) will be going to deploy on Kubernetes (IBM cloud). Could you please let me know where should I check first for the above specified requirement.

Thanks & Regards

Neha Singh

---

<div class="post-metadata">

**Author:** ![m.nelson](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@m.nelson](https://forum.ansible.com/u/m.nelson)\
**Post date:** [October 4, 2022, 9:25am UTC](https://forum.ansible.com/t/dockerized-the-awx-application/37111/4 "2022-10-04T09:25:54Z")

</div>

Hi,

If I understand correctly, you would like to deploy an AWX instance on Kubernetes.

The process is rather simple:

- prepare the storage for the database and awx pod, pv, pvc

- Clone the operator git repo and deploy it in your chosen namespace

- prepare manifest to deploy awx and apply it to the namespace where the operator is deployed with kubectl or kustomization

There are lots of examples available:

[https://github.com/antuelle78/awx-install-on-k3s](https://github.com/antuelle78/awx-install-on-k3s)

[https://github.com/kurokobo/awx-on-k3s](https://github.com/kurokobo/awx-on-k3s)

These repos are for k3s, but they contain examples of kustomization, pv, pvc, and awx manifests.

Hope that helps,

Regards,

Antuelle78

---

<div class="post-metadata">

**Author:** ![neha0021997](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@neha0021997](https://forum.ansible.com/u/neha0021997)\
**Post date:** [October 4, 2022, 9:29am UTC](https://forum.ansible.com/t/dockerized-the-awx-application/37111/5 "2022-10-04T09:29:07Z")

</div>

Hello Michael,

Thanks for the prompt reply.

I got this step using kubectl and performed the same in my local environment cluster.

But now I am looking for the _dockerization_ of this application like…through **_Dockerfile_** and then deploy the docker file in any cloud instance (like ec2 etc.)

Thanks & Regards

Neha Singh

---

<div class="post-metadata">

**Author:** ![m.nelson](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@m.nelson](https://forum.ansible.com/u/m.nelson)\
**Post date:** [October 4, 2022, 9:45am UTC](https://forum.ansible.com/t/dockerized-the-awx-application/37111/6 "2022-10-04T09:45:31Z")

</div>

Hi Neha,

If your goal is to deploy on any cloud instance, it’s best if you follow the recommendations from the AWX Team.

The links provided in my previous message can help.

The most important thing to note is that k3s(lightweight kubernetes) is installed on a single node and awx deployed.

Not sure why you want to create a “Dockerfile”.

Regards,

---

<div class="post-metadata">

**Author:** ![neha0021997](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@neha0021997](https://forum.ansible.com/u/neha0021997)\
**Post date:** [October 4, 2022, 9:53am UTC](https://forum.ansible.com/t/dockerized-the-awx-application/37111/7 "2022-10-04T09:53:25Z")

</div>

Thanks for the required details.

I’ll follow up with the given links regarding deploying the application in k8s.

Just one question though. Regarding Dockerfile, I wanted to build the image for this application. So that is why I am checking whether it is feasible or not. This application can be run through container or not?

Thanks and Regards

Neha Singh

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [October 5, 2022, 7:41pm UTC](https://forum.ansible.com/t/dockerized-the-awx-application/37111/8 "2022-10-05T19:41:21Z")

</div>

Hi Neha,

To provide some clarification,

the normal recommended install (via awx-operator) _already uses_ a containerized version of AWX.

awx-operator will deploy this image in a pod, [quay.io/repository/ansible/awx](http://quay.io/repository/ansible/awx)

So, by using k8s (awx-operator), you already are using a containerized version of AWX

Hope that helps

Seth

---

<div class="post-metadata">

**Author:** ![Brett\_Murphy](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@Brett\_Murphy](https://forum.ansible.com/u/Brett_Murphy)\
**Post date:** [October 6, 2022, 1:53am UTC](https://forum.ansible.com/t/dockerized-the-awx-application/37111/9 "2022-10-06T01:53:02Z")

</div>

Hi Neha, are you aware that kubernetes IS a containerisation platform?  
You say “This application can be run through container or not?”

You already are running AWX in containers with minikube, so no need to use docker.

When you deploy AWX with the operator it sets up everything that is required for containers to run in pods (groups of containers), with correct storage/database etc.  
Those containers in kubernetes are already using a container (docker) image anyway, so why would you want to rebuild one?

These are the container images that AWX 21.7 currently use:

[quay.io/ansible/awx:21.7.0](http://quay.io/ansible/awx:21.7.0)  
[quay.io/ansible/awx-ee:latest](http://quay.io/ansible/awx-ee:latest)

[docker.io/redis:7](http://docker.io/redis:7)

To build all these into one image and run in one docker container would be an epic feat requiring complete re-architecting of how AWX now works (ie., undoing everything that has been done to containerise AWX in the first place)

You say your requirement is to “deploy the docker file in any cloud instance (like ec2 etc.)”  
All cloud providers have a kubernetes option similar to minikube, so just deploy directly to them.

Murf.
