# Mounting local/host volume while installing through docker-compose

**URL:** <https://forum.ansible.com/t/mounting-local-host-volume-while-installing-through-docker-compose/34364>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [December 22, 2020, 8:30am UTC](https://forum.ansible.com/t/mounting-local-host-volume-while-installing-through-docker-compose/34364 "2020-12-22T08:30:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nithin\_V\_Gopal](https://avatars.discourse-cdn.com/v4/letter/n/58f4c7/32.png) [@Nithin\_V\_Gopal](https://forum.ansible.com/u/Nithin_V_Gopal)\
**Post date:** [December 22, 2020, 8:30am UTC](https://forum.ansible.com/t/mounting-local-host-volume-while-installing-through-docker-compose/34364/1 "2020-12-22T08:30:58Z")

</div>

Hi,

I am new to AWX world probably this query might be a duplicate.

I have installed AWX using docker-compose and running a job which has two steps

- Execute the script in remote
- Copy the output back to host /tmp folder

The script is successfully getting executed where as the copy task is copying the output to containers’ /tmp not the host.

Can someone point on how to mount local directory when launching the AWX through docker-compose?

I tried changing the docker-compose file, it doesn’t work as the installer re-writes the docker-compose.yaml when re-installing.

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [December 23, 2020, 10:15am UTC](https://forum.ansible.com/t/mounting-local-host-volume-while-installing-through-docker-compose/34364/2 "2020-12-23T10:15:38Z")

</div>

This may not be the right way, but I suggest you look at using a bind mount - [https://docs.docker.com/storage/bind-mounts/](https://docs.docker.com/storage/bind-mounts/)

---

<div class="post-metadata">

**Author:** ![Abhinit\_Mallick](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Abhinit\_Mallick](https://forum.ansible.com/u/Abhinit_Mallick)\
**Post date:** [January 6, 2021, 2:15pm UTC](https://forum.ansible.com/t/mounting-local-host-volume-while-installing-through-docker-compose/34364/3 "2021-01-06T14:15:31Z")

</div>

Hi Nithin,

Greetings of the day

I have a similar requirement ,My requirement is that I must be able to mount a remote mount in awx, the way we are running awx is standalone docker images  
This what I did to make things work in normal environment

So when awx is installed in a normal estate all it does is within the {{awx git repo clone}}/installer/roles/local\_docker/templates/docker-compose.yml.j2  
and from that it creates /root/.awx/awxcompose/docker-compose.yml

All I had to do was edit /root/.awx/awxcompose/docker-compose.yml to mount the volume ( this is the same place where you can use custom images as well)

The only bad side of such a setup is everyime I upgrade my awx instance I will need to manually change the file to add the remote mount.

Regards  
Abhinit Mallick
