[Question]: How to access path files on the host without using host.lan Thank!
Is your question not already answered in the FAQ?
- [x] I made sure the question is not listed in the FAQ.
Is this a general question and not a technical issue?
- [x] I am sure my question is not about a technical issue.
Question
I started a Python script in a Windows container and wanted to retrieve files from a certain path on the host computer. However, I have only found that files can be accessed through network host.lan using shared files. Can I use podman to mount files? Is there a way to achieve this? Thank you!
sudo podman run --rm -it --name windows
--net=bridge
--cap-add=NET_ADMIN
--cap-add=NET_RAW
--device=/dev/kvm
--device=/dev/net/tun
--sysctl net.ipv4.ip_forward=1
-v "${PWD:-.}/windows:/storage"
-v /home/example:/data
-v /home/data:/excel
-p 8006:8006
-p 8000:8000
--stop-timeout 120
dockurr/windows
-v /home/data:/excel:This line is the file path I want to mount, but it doesn't seem to work
host.lan is reachable in bridge networking mode (dockerbridge). If you configure kubernetes pod to user mode networking (NETWORK=user), than host.lan is not reachable anymore and I am not able to share files from a host machine to the Windows container. Is there any other option to share files between a host machine and the container when running in user mode networking?
@TesterEric That issue has been fixed, you can now use file sharing in usemode networking!