boot2podman / machine

Apache License 2.0
120 stars 16 forks source link

Examples fail #7

Closed dinamic closed 4 years ago

dinamic commented 5 years ago

Going with the examples, something is definitely missing:

~$ podman-machine ls
NAME   ACTIVE   DRIVER   STATE     URL               ERRORS
box    -        qemu     Running   tcp://127.0.0.1
podman-machine ssh box -- sudo podman run -d -p 8080:80 nginx
Error: error creating libpod runtime: could not initialize iptables protocol 0: exec: "iptables": executable file not found in $PATH
exit status 125
afbjorklund commented 5 years ago

Hmm, wonder if I missed an ssh patch when I upgraded to TCL 10.x... It was causing some /usr/local/sbin to go missing from PATH. This would be a regression of this bug: https://github.com/boot2podman/boot2podman/issues/11

afbjorklund commented 5 years ago

This is the workaround, for now:

export PATH=/usr/local/sbin:$PATH

It needs to go in the ~/.profile

cmoulliard commented 5 years ago

Can you release this fix please as we still suffer from this use when we execute this command with a fresh podman-machine version ? @afbjorklund

afbjorklund commented 5 years ago

@cmoulliard : sure, will do

afbjorklund commented 5 years ago

This error is actually in the boot2podman.iso so need to do another release there as well

afbjorklund commented 5 years ago

Similar workaround:

$ podman-machine ssh box -- sudo PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin podman run -d -p 8080:80 nginx
Trying to pull docker.io/library/nginx...Getting image source signatures
Copying blob sha256:b8f262c62ec67f02536f49654de586c022043652bbb6bbf76a8dab1542627a8d
Copying blob sha256:a6639d774c21523ed49d1becdfc9af3e6f7bc1814c2ac5c74f1c96d48a311053
Copying blob sha256:22a7aa8442bf42f645c988589059966cb4bc9ca05b712cea56ae26dcd7477a6d
Copying config sha256:ab56bba91343aafcdd94b7a44b42e12f32719b9a2b8579e93017c1280f48e8f3
Writing manifest to image destination
Storing signatures
cc15c8564cdb448e9d3c0975f3a7c687ee04cd238d32f95d124ae590b140214d
$ echo http://$(podman-machine ip box):8080
http://192.168.99.100:8080

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

Sorry for the inconvenience.

afbjorklund commented 4 years ago

Should be fixed with boot2podman 0.23

dinamic commented 4 years ago

Thanks for the update @afbjorklund! That's awesome news! I'm yet to try the fix in the upcoming days.