# Upgrade nginx from 1.14 to 1.18 in awx\_web container.

**URL:** <https://forum.ansible.com/t/upgrade-nginx-from-1-14-to-1-18-in-awx-web-container/33818>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [September 15, 2020, 8:49pm UTC](https://forum.ansible.com/t/upgrade-nginx-from-1-14-to-1-18-in-awx-web-container/33818 "2020-09-15T20:49:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HEMANTH\_REDDY\_AVUTU](https://avatars.discourse-cdn.com/v4/letter/h/e95f7d/32.png) [@HEMANTH\_REDDY\_AVUTU](https://forum.ansible.com/u/HEMANTH_REDDY_AVUTU)\
**Post date:** [September 15, 2020, 8:49pm UTC](https://forum.ansible.com/t/upgrade-nginx-from-1-14-to-1-18-in-awx-web-container/33818/1 "2020-09-15T20:49:58Z")

</div>

Hi All,

My containers are running on nginx 1.14 which is outdated and want to upgrade to 1.18, but nginx is pre installed in a container and created a docker image using the container. And we are using that image for the awx.

Can someone suggest the best way to upgrade the nginx.

Thanks,  
Hemanth.

---

<div class="post-metadata">

**Author:** ![Hrvoje\_Gaspar](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@Hrvoje\_Gaspar](https://forum.ansible.com/u/Hrvoje_Gaspar)\
**Post date:** [September 21, 2020, 9:40am UTC](https://forum.ansible.com/t/upgrade-nginx-from-1-14-to-1-18-in-awx-web-container/33818/2 "2020-09-21T09:40:24Z")

</div>

Honestly, I don’t see a reason to update nginx until official awx image is published with upgraded version.  
That being said, if you really would like to test things out, and do want to upgrade nginx on your own, the way to go, for me at least, would be the following:

Create a new Dockerfile from the latest awx image:  
[https://hub.docker.com/layers/ansible/awx/latest/images/sha256-24b8f551e99a10a9c943966cf540b248c85f7c3daf4b24a3b0e7123affbca389?context=explore](https://hub.docker.com/layers/ansible/awx/latest/images/sha256-24b8f551e99a10a9c943966cf540b248c85f7c3daf4b24a3b0e7123affbca389?context=explore)

Add additional layers that would import yum nginx repo (OS is CentOS 8.2), perform the upgrade, and then save the Dockerfile in the same directory you stored your docker-compose.yml when installing awx.  
Edit docker-compose.yml, use your own image instead of public one for awx\_web and awx\_task, and rebuild the containers using docker-compose.

However, ensure that your nginx configuration is valid for the new nginx version (it will be stored in the same directory as docker-compose), and test things out before moving on.

All tower objects should remain (inventories, credentials, jobs, projects, templates, settings, ect…), as they are stored in postgres, and postgres data is mounted in volume persistently on host, so restarting containers will not erase your data.

If unsure where your docker-compose is stored, check your installation inventory file. By default it’s set to ~/.awx/awxcompose/

Dana utorak, 15. rujna 2020. u 22:49:58 UTC+2 korisnik [heman...@gmail.com](mailto:heman...@gmail.com) napisao je:

---

<div class="post-metadata">

**Author:** ![Hrvoje\_Gaspar](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@Hrvoje\_Gaspar](https://forum.ansible.com/u/Hrvoje_Gaspar)\
**Post date:** [September 22, 2020, 11:19am UTC](https://forum.ansible.com/t/upgrade-nginx-from-1-14-to-1-18-in-awx-web-container/33818/3 "2020-09-22T11:19:20Z")

</div>

Ok, I went ahead and tested this. It’s pretty straightforward, and works like a charm.

Dana ponedjeljak, 21. rujna 2020. u 11:40:24 UTC+2 korisnik Hrvoje Gašpar napisao je:
