docker-ssh-agent-forward
docker-ssh-agent-forward copied to clipboard
podman support please
podman is not support out of the box at the moment.
I'll see if I can make it work on my end...
The only changes I made to make it (kind of) work with podman under Mac are:
sudo ln -vsf podman /opt/homebrew/bin/docker
sudo sed -i '/docker volume create/s/ --name//' /usr/local/bin/pinata-ssh-forward
So, in order to support podman, the only changes need are:
- detect if podman instead of docker is available (and set
$DOCKERaccordingly), - if so, instead of calling
docker volume create --name "${VOLUME_NAME}", call$DOCKER volume create "${VOLUME_NAME}"
That's it.
As for Mac, unlike Docker, mounting any local volumes in Podman on macOS requires an additional step of sharing the folder with the Podman VM before they can be mounted into a container, yet pinata-ssh-forward need a working Podman VM to run. I tried
podman machine init, then called pinata-ssh-forward successful, then tried to call podman machine init -v ssh-agent:/ssh-agent again, but got:
$ podman machine start
Starting machine "podman-machine-default"
Waiting for VM ...
Error: qemu exited unexpectedly with exit code 1, stderr: qemu-system-aarch64: -virtfs local,path=ssh-agent,mount_tag=vol6,security_model=none: cannot initialize fsdev 'vol6': failed to open 'ssh-agent': No such file or directory
Hope there is a way to circumvent the chicken-egg dilemma somehow (like making the ssh-agent thing a local folder or something). thx.