podman-desktop icon indicating copy to clipboard operation
podman-desktop copied to clipboard

support for port forwarding and host volume mount

Open djnotes opened this issue 2 years ago • 6 comments

Is your feature request related to a problem? Please describe

No

Describe the solution you'd like

Support port forwarding and host bind mount like docker desktop.

Describe alternatives you've considered

The heavy Docker Desktop

Additional context

Will Podman Desktop be able to support port forwarding to host and bind mount, just the way installing Docker Desktop adds these?

djnotes avatar Jun 15 '22 22:06 djnotes

Hello @djnotes there is already Host exposure. If you start a container using port arg it's exposing the port locally

About bind mount, latest podman 4.1 allow mount exposure from home directory for now

benoitf avatar Jun 16 '22 05:06 benoitf

Thanks @benoitf. How do I access those shared files in the container? I don't see any shared files inside the home directory after I ssh into the vm with podman machine ssh podman-machine-default.

djnotes avatar Jun 16 '22 15:06 djnotes

podman machine supports host volume shareing into the VM which can then be shared into the container.

podman v4.1 automatically share $HOME:$HOME into the container. You can add containers.conf to customize the volumes. podman-desktop does not yet allow you to customize this file. Similarly ports shared from the container are shared on the host via gvproxy tool.

rhatdan avatar Jun 16 '22 15:06 rhatdan

Is it possible to successfully run docker-compose on Mac with this backend too? I tried setting DOCKER_HOST with the following, but docker-compose won't work. unix:///Users/mehdi/.local/share/containers/podman/machine/podman-machine-default/podman.sock

djnotes avatar Jun 16 '22 15:06 djnotes

You would probably be better off asking these questions on podman not podman desktop.

rhatdan avatar Jun 16 '22 15:06 rhatdan

@ashley-cui @baude PTAL

rhatdan avatar Jun 16 '22 15:06 rhatdan

Since 4.2 when you start a podman-machine it automatically mount your $home folder. Enhancements coming to also include the /tmp folder : https://github.com/containers/podman/issues/16447

slemeur avatar Nov 30 '22 15:11 slemeur