-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 image scp
should support local Unix sockets
#23297
Comments
A friendly reminder that this issue had no activity for 30 days. |
Is no-one interested in this? |
Are you interested in opening a PR? |
I'd be interested if @vlk-charles is not |
You got it. |
Ok so having looked into it a little bit, I'll need some feedback on a proposal for an extension to the command's syntax: For instance, we could do something like @vlk-charles suggests: There are many cases to consider though in the same vein, such as sending/receiving from different users, while specifying the sockets to use on the sending and receiving ends. To give other examples: root with special socket -> our user with default socket: podman image scp root@unix:///path/to/sending.socket::alpine same as above but with named connection via podman system connection add sender unix:///path/to/sending.socket
podman image scp root@sender::alpine our user with default socket -> root with special socket: podman image scp alpine root@unix:///path/to/receiving.socket:: same as above but with named connection: podman system connection add receiver unix:///path/to/receiving.socket
podman image scp alpine root@receiver:: root with default socket -> our user with special socket (note that "localhost" would just act as the user's default socket location): podman image scp root@localhost::alpine unix:///path/to/receiving.socket:: same as above but root -> another user: podman image scp root@localhost::alpine username@unix:///path/to/receiving.socket:: our user -> our user but with different sockets: podman image scp unix:///path/to/sending.socket::alpine unix:///path/to/receiving.socket:: same as above but with named connections via podman system connection add sender unix:///path/to/sending.socket
podman system connection add receiver unix:///path/to/receiving.socket
podman image scp sender::alpine receiver:: This kind of syntax could also be extended to remote->local transfers to specify users and local socket to use, for example: podman image scp [email protected]:22::alpine root@unix:///some_socket.sock:: ^ Though I may be getting ahead of myself here, I think a more unified syntax would be nice for cases like this. This would be in line with the syntax that already exists for local->local transfers, it uses, and it also shares the syntax for specifying the path to the socket that remote->local transfers use. The goal would be to extend the current syntax in a backwards-compatible way. The only thing I'm a little tripped up on is how to integrate something like this example from the man page: Copy specified image from local storage to remote connection:
podman image scp alpine Fedora::/home/charliedoern/Documents/alpine Would this also mean you should be able to do this (which you can't do currently btw): podman image scp alpine root@localhost::/root/Documents/alpine To be able copy the image from local to /root/Documents/alpine? How could the socket play into this, if at all? (Just ignore the socket if provided, bc we're just writing to a file? I'm not positive how the original example would work anyways) Ignoring that point above, the overall proposed syntax's SYNOPSIS would be:
Anyways, sorry this is so drawn out. But I believe this syntax extension could be a nice addition to make usage of local transfers and remote transfers more similar. To me, it seems necessary to do all this in order to implement the feature as requested, at least while also working with situations like the examples I provided. I am open to feedback and criticism, as I am sure I've missed some considerations. |
Thank you for picking this up, @zackattackz. Is it necessary to specify a user when referring to a Unix socket? Such a socket is already associated with a specific instance of the Podman daemon running under a certain user. Or am I mistaken? |
You mean like how you'd know the user ID is X based on it being at path It's true, but those are just defaults, and there's nothing stopping you from making a socket file at any location at all. So I figured you'd still need to specify the user. This is how the So I was thinking EDIT: |
Feature request description
podman image scp
accepts connections added withpodman system connection add
. It should not "choke" on some of these connections. A connection can be specified as a local Unix socket file (according to the manual page):However, the following command "chokes" on it:
Suggest potential solution
As Unix sockets over SSH seem to be supported (according to one of the examples in the manual page), I would expect local ones to be supported as well.
Have you considered any alternatives?
I also tried the option mentioned in the manual page as:
But that complained about missing
machinectl
. I know that can probably be made to work but I tired avoidingmachinectl
.I guess it is possible to get SSH to work for localhost but that seems superfluous.
Additional context
The text was updated successfully, but these errors were encountered: