Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In MacOS, latest version(1.5.1) of podman can't pull images. #3882

Closed
gaord opened this issue Aug 25, 2019 · 24 comments
Closed

In MacOS, latest version(1.5.1) of podman can't pull images. #3882

gaord opened this issue Aug 25, 2019 · 24 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote

Comments

@gaord
Copy link

gaord commented Aug 25, 2019

/kind bug

Description
In MacOS, latest version(1.5.1) of podman can't pull images.

Steps to reproduce the issue:

  1. In MacOS console, run "brew cask instal podman"

  2. do a pull to see the issue

Describe the results you received:
here is the result:
bogon:Downloads test$ podman pull quay.io/openshift-release-dev/ocp-release@sha256:c28afba66cc09233f7dfa49177423e124d939cf5b0cd60d71bbb918edb0ed739
Error: could not get runtime: dial unix /run/podman/io.podman: connect: no such file or directory

Describe the results you expected:
I can pull images by podman

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

bogon:Downloads test$ podman version
Client:
Version:            1.5.1
RemoteAPI Version:  1
Go Version:         go1.12.2
OS/Arch:            darwin/amd64

Service:
Error: could not get runtime: dial unix /run/podman/io.podman: connect: no such file or directory

Output of podman info --debug:

bogon:Downloads test$ podman info --debug
Error: could not get runtime: dial unix /run/podman/io.podman: connect: no such file or directory
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 25, 2019
@baude
Copy link
Member

baude commented Aug 25, 2019

@gaord curious if you were following any instructions for this?

@gaord
Copy link
Author

gaord commented Aug 25, 2019

@baude not quite. Just new to podman from docker. Any ideas?

@baude
Copy link
Member

baude commented Aug 25, 2019

the way that the mac client works is that it needs a vm running Linux and Podman to connect to ... you then, using a configuration file, can point to that VM and interact with it.

@mheon
Copy link
Member

mheon commented Aug 25, 2019

The Mac client defaulting to a local endpoint sounds like a bug, though

@baude
Copy link
Member

baude commented Aug 25, 2019

no it isnt ... but the error could be better

@diegolovison
Copy link

Hi, do we have a workaround or a way to fix?

@rhatdan
Copy link
Member

rhatdan commented Aug 28, 2019

@ashley-cui PTAL

@mheon mheon added the remote Problem is in podman-remote label Aug 28, 2019
@ashley-cui
Copy link
Member

@rhatdan I think it is working correctly; the error message looks like it's telling the user that it's not connected to a remote host. I can see if I can try to edit the error message to have better information?

@rhatdan
Copy link
Member

rhatdan commented Aug 29, 2019

@ashley-cui Please tell @gaord how to set it up, or point him to documentation on how to do it.

@ashley-cui
Copy link
Member

@rhatdan Is it beneficial to add a documentation on where we are currently on the mac client? Since the explanation will be pretty long anyway, should we start something like a mac_client.md, or a mac section or remote_client.md, or some sort of blog post regarding where we are and how to use it?

@ashley-cui
Copy link
Member

ashley-cui commented Aug 29, 2019

Here's a brief write up: @gaord

Hi! So in order to use the the podman client on mac, currently, you have to have a linux machine running somewhere. It could be a vm or another physical machine.
In order to connect to it, you can use environment variables, flags, or the podman-remote.conf file.

To connect using flags, you can use podman --remote-host linux-ip --username root
Take a look at podman-remote.conf.5.md on how to use the conf file.

Your linux IP can be determined using ip addr

It’s probably the best if you use --username root. To do you this you may need to edit your /etc/ssh/sshd_config in your linux machine:
PermitRootLogin yes

In order to avoid ‘logging in’ every time you run a podman command, you may need to edit your /etc/ssh/sshd_config in your linux machine as follows:

PasswordAuthentication no 
PermitRootLogin without-password

You may also need to scp ssh keys from your mac to your linux host (from Mac ~/.ssh/id.pub in /root/.ssh/authorized_keys)

In order to connect, make sure your linux machine has podman installed on it, and run

sudo systemctl start io.podman.socket
sudo systemctl enable io.podman.socket

Then, you can use podman as you usually do, with the podman-remote.conf file populated or use it with flags: podman --remote-host linux-ip --username root COMMAND

@mheon
Copy link
Member

mheon commented Aug 29, 2019

A small addendum, but I would strongly recommend use SSH key authentication, as opposed to allowing passwordless root login - much safer

@rhatdan
Copy link
Member

rhatdan commented Aug 29, 2019

@ashley-cui Lets make a mac_client.md

@gaord
Copy link
Author

gaord commented Aug 29, 2019

Thanks all. that makes sense for me. -Ben

@jdjgya
Copy link

jdjgya commented Sep 7, 2019

Hi team Podman,

Sorry for a question and bother.
I'm a newcomer and fans of Podman.

I got a same problem of issue above, so I read the discussions above and setup a Fedora28 VM which already installed Podman, then follow the instructions(https://podman.io/blogs/2019/01/16/podman-varlink.html) to setup socket activation of Podman.

then I back to my MackOS to install the Podman client(followed the instructions in the newest mac_client.md which just updated in these days), but I got another error regarding

# podman --remote-host 192.168.22.21 --username podmanuser images
varlink: '/usr/bin/podman --log-level=error varlink \$VARLINK_ADDRESS' is not a valid command.
Try 'varlink --help' for more information
Error: unable to get images: unexpected EOF

would you mind to let me know if there's something I missed for setup Podman and Podman client?
take your time, Thanks so much

@rhatdan
Copy link
Member

rhatdan commented Sep 7, 2019

I think you might need to use root for now. @jwhonce PTAL

@baude
Copy link
Member

baude commented Sep 24, 2019

@jdjgya i believe you might be missing the varlink command itself which I'm not certain is supported on f28. Can you use f29 and install one of the varlink packages that provides /usr/bin/varlink.

@baude
Copy link
Member

baude commented Sep 24, 2019

@jdjgya if that does not work with the latest podman and f29, please open a new issue and we'll help you out.

@baude baude closed this as completed Sep 24, 2019
@rhatdan
Copy link
Member

rhatdan commented Sep 27, 2019

You should really move to f30 since f29 is getting close to it's end of life.

@homernajafi
Copy link

We talked about 'how' but not 'why'. Why we can't run podman on OSX without having a linux VM? Is there any plan to get it working without VM?
This is kind of a dealbreaker for us.

@mheon
Copy link
Member

mheon commented Oct 8, 2019

The lack of a proper OCI-compliant container runtime makes launching containers on OS X impossible without a VM being involved. There's a large amount of additional work that will need to be done if that hurdle is overcome - porting things like fuse-overlayfs and Conmon will be major efforts all their own - but without the ability to launch containers, there's no point.

@rhatdan
Copy link
Member

rhatdan commented Oct 9, 2019

Podman is a tool for running, building, manageing LINUX containers. Not MAC containers. In order to run a Linux Container you need a Linux kernel. On Windows they have added WSL to make people think that linux containers are running natively. But really under the covers they are just running a builtin VM.

Bottom line, unless MAC decided to build and support OCI based containers with an OCI based image, then you need a VM.

@sluongng
Copy link

Personally I find this disappointing. MacOS is a primary dev environment in many organizations and podman is being advertised as a painless transition from docker CLI.

Having developer from only having to install Docker for MacOS to having install podman (via brew) and managing your own VM with remote connection is a terrible developer experience and will limit the adoption rate of this tool.

I strongly urge you guys review as IMO this is not a good product direction to continue.

@rhatdan
Copy link
Member

rhatdan commented Oct 25, 2019

Docker requires the same VM, it is not doing anything with MAC Containers. There is not difference. From a usability point of view, Boot2Docker and DockerMachine is better. Although opensource teams are working on Boot2Podman and we hope to get better integration with CRC (Code Ready Containers) for OpenShift integration. We continue to work on MAC and Windows support and are always looking for contributors to help accelerate the movement.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote
Projects
None yet
Development

No branches or pull requests