# Copy custom Python files to Ignition Docker

**URL:** <https://forum.inductiveautomation.com/t/copy-custom-python-files-to-ignition-docker/80927>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [October 24, 2023, 6:32pm UTC](https://forum.inductiveautomation.com/t/copy-custom-python-files-to-ignition-docker/80927 "2023-10-24T18:32:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfan](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@jfan](https://forum.inductiveautomation.com/u/jfan)\
**Post date:** [October 24, 2023, 6:32pm UTC](https://forum.inductiveautomation.com/t/copy-custom-python-files-to-ignition-docker/80927/1 "2023-10-24T18:32:22Z")

</div>

Hi All,

Does anyone know how to copy/insert a Python source file to the user-lib/pylib/site-packages in the docker environment? I am trying to leverage docker for my project development.

Any input will be appreciated!

Thanks,  
Justin

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [October 24, 2023, 8:07pm UTC](https://forum.inductiveautomation.com/t/copy-custom-python-files-to-ignition-docker/80927/2 "2023-10-24T20:07:22Z")

</div>

`docker cp source/path container:target/path`

> **[docker cp](https://docs.docker.com/engine/reference/commandline/cp/)**

Another solution, if you want to share a custom library, would be to use bind mounts:

> **[Bind mounts](https://docs.docker.com/storage/bind-mounts/)**
>
> Using bind mounts

---

<div class="post-metadata">

**Author:** ![jfan](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@jfan](https://forum.inductiveautomation.com/u/jfan)\
**Post date:** [October 24, 2023, 8:21pm UTC](https://forum.inductiveautomation.com/t/copy-custom-python-files-to-ignition-docker/80927/3 "2023-10-24T20:21:20Z")

</div>

Thank you for the response! for the first option, do I spin up the container first and then execute the command? Is there a way I can do that in the docker-compose?

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [October 24, 2023, 8:32pm UTC](https://forum.inductiveautomation.com/t/copy-custom-python-files-to-ignition-docker/80927/4 "2023-10-24T20:32:28Z")

</div>

I'm not sure how to execute a one time copy from a compose configuration...

If you just need a one time copy, just use the command.

But consider the bind mount option. That's what I'd use if I wanted to use a custom library from the host.  
And I'd also probably make it read only.

---

<div class="post-metadata">

**Author:** ![jfan](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@jfan](https://forum.inductiveautomation.com/u/jfan)\
**Post date:** [October 30, 2023, 8:17pm UTC](https://forum.inductiveautomation.com/t/copy-custom-python-files-to-ignition-docker/80927/5 "2023-10-30T20:17:22Z")

</div>

Actually, figure out another way to do it. I can just import the folder to the directory with docker desktop. Thanks for the help!

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [October 31, 2023, 7:48am UTC](https://forum.inductiveautomation.com/t/copy-custom-python-files-to-ignition-docker/80927/6 "2023-10-31T07:48:03Z")

</div>

I'm pretty sure that's `docker cp` in a GUI.
