-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add support for --follow-link option in podman cp #16585
Add support for --follow-link option in podman cp #16585
Comments
@htjain I started working on this a while back, but have too many other higher priorities now to finish in a reasonable amount of time. If you were interested in taking it over, we could move it forward. |
Yes. It is all yours. |
A friendly reminder that this issue had no activity for 30 days. |
@htjain any progress? |
A friendly reminder that this issue had no activity for 30 days. |
@flouthoc PTAL |
A friendly reminder that this issue had no activity for 30 days. |
@rhatdan I'd like to look into this. |
@danishprakash Thanks assigned it to you :) |
While triaging, I found some issues with what we're trying to achieve which I'd like to clear before I move on. It looks like In
Now, podman, by default, follows the link without the |
Okay podman indeed by default follows the symlink, i'd say we should default to how docker does and introduce a Again my vote is to default how docker does it but lets wait for others to take a look. @rhatdan @containers/podman-maintainers WDYT ? |
+1 to the Docker behavior. It is safer to not follow symlinks by default |
Agreed. Docker compat is also a compelling reason to change the default. |
That sounds great but as @flouthoc said, I'm also concerned that this is a breaking change and might break existing workflows. Either way, I'll start looking into the changes. |
We need a boolean to change the default globally in containers.conf, then users who want the preivous default can customize their environment. |
Tried a sample implementation here which included changes to both buildah and podman. The idea is to maintain the symlink even if the target isn't present on the container which would inevitably lead to an error when accessed. This is docker's behaviour too. While passing
I can go ahead and finalize the PRs in both the repos if the approach above sounds reasonable. Thoughts? |
yes please open the PRs so we can comment on them |
I noticed that the PR in buildah got stale. In the meantime, could we introduce the |
Are you suggesting a dummy flag so that podman doesn't complain? |
Exactly, |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
Currently
podman cp
doesn't support for--follow-link
likedocker cp
does.Steps to reproduce the issue:
Describe the results you received:
Error: unknown flag: --follow-link
Describe the results you expected:
File
cp
command should copy target file to container.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
orbrew info podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Same behavior on other OSs
The text was updated successfully, but these errors were encountered: