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
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
docker cp source/path container:target/path
Another solution, if you want to share a custom library, would be to use bind mounts:
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?
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.
Actually, figure out another way to do it. I can just import the folder to the directory with docker desktop. Thanks for the help!
I'm pretty sure that's docker cp
in a GUI.