# Add a file/template to a docker volume

**URL:** <https://forum.ansible.com/t/add-a-file-template-to-a-docker-volume/17538>\
**Category:** Ansible Project\
**Created:** [February 17, 2015, 8:19pm UTC](https://forum.ansible.com/t/add-a-file-template-to-a-docker-volume/17538 "2015-02-17T20:19:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![max.frigge](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@max.frigge](https://forum.ansible.com/u/max.frigge)\
**Post date:** [February 17, 2015, 8:19pm UTC](https://forum.ansible.com/t/add-a-file-template-to-a-docker-volume/17538/1 "2015-02-17T20:19:29Z")

</div>

What would be the best approach to get a file (based on template) into a docker volume?

Right now I copy the file to the host and then mount the hosts folder to the data volume.  
This works but I would rather directly add the file to the data volume without linking a host folder to the container.

Any ideas?
