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

Podman on mac not connecting. #1

Open
gedw99 opened this issue Mar 31, 2023 · 13 comments
Open

Podman on mac not connecting. #1

gedw99 opened this issue Mar 31, 2023 · 13 comments

Comments

@gedw99
Copy link

gedw99 commented Mar 31, 2023

This is a cool approach - thanks for putting this up.

i did the setup on Mac...

sw_vers
ProductName:	macOS
ProductVersion:	11.7.4
BuildVersion:	20G1120

brew install podman
brew install gpgme

podman --version
podman version 4.4.4

podman machine init -v $HOME:$HOME
podman machine start

apple@x-MacBook-Pro-2 nktest % podman machine list
NAME                     VM TYPE     CREATED         LAST UP            CPUS        MEMORY      DISK SIZE
podman-machine-default*  qemu        15 minutes ago  Currently running  1           2.147GB     107.4GB
apple@x-MacBook-Pro-2 nktest % podman machine start
Error: cannot start VM podman-machine-default: VM already running or starting

But cant connect. I am new to Podman :)

nktest % ls
LICENSE  README.md  config.yml.tpl  ctx.go  docker.go  example_test.go	go.mod	go.sum	log.go	nksample  nktest.go  nktest_test.go  podman.go	proxy.go  runner.go
apple@x-MacBook-Pro-2 nktest % DEBUG=1 go test -v
go: downloading golang.org/x/term v0.2.0
go: downloading github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6
go: downloading golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0
go: downloading golang.org/x/net v0.2.0
go: downloading google.golang.org/grpc v1.49.0
go: downloading google.golang.org/genproto v0.0.0-20220720214146-176da50484ac
error: unable to create podman client: unable to open podman connection: unable to connect to Podman socket: Get "http://d/v4.3.1/libpod/_ping": dial unix /var/run/podman/podman.sock: connect: no such file or directory
exit status 1
FAIL	github.com/ascii8/nktest	0.891s
apple@x-MacBook-Pro-2 nktest % 

@gedw99
Copy link
Author

gedw99 commented Mar 31, 2023

do i have to enable docker compatibility maybe ?

@ascii8
Copy link
Owner

ascii8 commented Mar 31, 2023

@gedw while nktest was working with macOS (m1 hardware) some time ago, the recent changes to podman are not currently working. it works fine under linux. you can try manually specifying the podman host, or trying to use it with docker, but it's not likely going to work.

we use nktest primarily for CI/CD tests, which run 100% under linux, and works great out of the box with nktest. i have some time this weekend, so i'll try to get it running again on macOS. believe me, i'd like this to work out of the box with podman on macOS, but i have limited time re-debug podman on macOS for every major podman release, as i don't use macOS on a day-to-day basis.

i'd appreciate your help/assistance with this, especially if you're a regular macOS user. if you were so inclined to try out some tests, i'd suggest trying to get other containers working with podman, with local volume mounts. the last time i was trying this, i had issues with running the postgres container and gave up.

it's worth noting that the way podman works on macOS is that it runs a full VM using qemu, and then connects (over ssh) to the VM and uses that VM's podman host. i understand it'd be great to just be able to use it natively on macOS, but as a workaround that would net you the same workflow, i'd suggest running a small linux vm yourself on macOS, with a directory mounted on your host macOS, and then shell in and use it for tests. you'd still be able use the macOS UI/apps for developing, just would need to run tests under your linux vm.

@gedw99
Copy link
Author

gedw99 commented Apr 1, 2023

I got podman working with other containers. Works very well ! Much better than colima etc…

I enabled docker and docker compose integration.

In .zshrc i added a docker alias also.

so will also try again this weekend.

@BSantosCoding
Copy link

Any news on this? Been wanting to run tests with nktest too, and cant use it out of the box either.
image

@RomanPrudkogliad
Copy link

@ascii8 @gedw99 any updates, I stuck with same issue when running nkTest locally on my mac. Or mb there is any workaround for this time?

@BSantosCoding
Copy link

@ascii8 @gedw99 any updates, I stuck with same issue when running nkTest locally on my mac. Or mb there is any workaround for this time?

Tried reaching out to him with no success, here and on nakamas forums.

@svenelvelt
Copy link

Got it running by exporting CONTAINER_HOST to the one specified by podman:
export CONTAINER_HOST=/var/run/docker.sock

@BSantosCoding
Copy link

Got it running by exporting CONTAINER_HOST to the one specified by podman: export CONTAINER_HOST=/var/run/docker.sock

Just tried, not working for me either sadly

@gedw99
Copy link
Author

gedw99 commented Jun 16, 2024

I changed to orb stack and it’s been totally painless

@BSantosCoding
Copy link

I changed to orb stack and it’s been totally painless

Any quick guide I could follow for that?

@gedw99
Copy link
Author

gedw99 commented Jun 16, 2024

Just download it and it just works.

It’s really good .

uninstall all docker crap first.

@BSantosCoding
Copy link

Just download it and it just works.

It’s really good .

uninstall all docker crap first.

Just did that (loving orbstack btw) but for nktest, get similar error
image

@gedw99
Copy link
Author

gedw99 commented Jun 17, 2024

I’m not familiar with nktest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants