# How to build awx as docker image

**URL:** <https://forum.ansible.com/t/how-to-build-awx-as-docker-image/29280>\
**Category:** AWX Project\
**Tags:** awx, kubernetes\
**Created:** [December 17, 2018, 11:46pm UTC](https://forum.ansible.com/t/how-to-build-awx-as-docker-image/29280 "2018-12-17T23:46:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kurrent93](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kurrent93](https://forum.ansible.com/u/kurrent93)\
**Post date:** [December 17, 2018, 11:46pm UTC](https://forum.ansible.com/t/how-to-build-awx-as-docker-image/29280/1 "2018-12-17T23:46:57Z")

</div>

Hello

In relation to [https://groups.google.com/d/msg/awx-project/qc3leFTQjfI/-balnkYJBgAJ](https://groups.google.com/d/msg/awx-project/qc3leFTQjfI/-balnkYJBgAJ) - I’m wanting to build a custom docker image, that will have the Openshift python package.  
This is so I can use the K8s inventory.

Does anyone have any docs, or guidence, on how to build the awx docker image?

Thanks

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [December 18, 2018, 1:34pm UTC](https://forum.ansible.com/t/how-to-build-awx-as-docker-image/29280/2 "2018-12-18T13:34:30Z")

</div>

You just need to override the image we have by modifying the dockerfile

after you do that you can follow the instructions here [https://github.com/ansible/awx/blob/devel/INSTALL.md#official-vs-building-images](https://github.com/ansible/awx/blob/devel/INSTALL.md#official-vs-building-images)

---

<div class="post-metadata">

**Author:** ![Anton\_Hughes](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@Anton\_Hughes](https://forum.ansible.com/u/Anton_Hughes)\
**Post date:** [December 19, 2018, 8:32pm UTC](https://forum.ansible.com/t/how-to-build-awx-as-docker-image/29280/3 "2018-12-19T20:32:10Z")

</div>

Hi Matthew

That is where I get a bit confused. There isnt a dockerfile. It looks like dockerfile gets generated using jinja. Its not clear how I generate this file - and if I need to run make to then build it.  
But there are also two images - awx\_web and awx\_task. And its not clear which one I need to modify.

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [December 20, 2018, 1:48pm UTC](https://forum.ansible.com/t/how-to-build-awx-as-docker-image/29280/4 "2018-12-20T13:48:40Z")

</div>

As you can see: [https://github.com/ansible/awx/blob/devel/installer/roles/image\_build/templates/Dockerfile.task.j2](https://github.com/ansible/awx/blob/devel/installer/roles/image_build/templates/Dockerfile.task.j2)

is based on

[https://github.com/ansible/awx/blob/devel/installer/roles/image\_build/templates/Dockerfile.j2](https://github.com/ansible/awx/blob/devel/installer/roles/image_build/templates/Dockerfile.j2)

from the instructions in the docs and the inventory file:

[https://github.com/ansible/awx/blob/devel/installer/inventory#L5-L8](https://github.com/ansible/awx/blob/devel/installer/inventory#L5-L8)

just comment out that line and it will trigger a local image build (rather than pulling the images from dockerhub).
