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-remote build: COPY does not preserve hardlinks #9893

Closed
edsantiago opened this issue Mar 30, 2021 · 4 comments · Fixed by #10421
Closed

podman-remote build: COPY does not preserve hardlinks #9893

edsantiago opened this issue Mar 30, 2021 · 4 comments · Fixed by #10421
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote

Comments

@edsantiago
Copy link
Member

$ cat Containerfile
FROM alpine
COPY . .
$ touch file1
$ ln file1 file2
$ ln file1 file3
$ ../bin/podman-remote build -t foo .
STEP 1: FROM alpine
STEP 2: COPY . .
STEP 3: COMMIT foo
--> 27caa37d33e
27caa37d33e63b26e39ac49f936de3eb6645dadb45cf70babba270f2f06c5fb0
$ ../bin/podman run --rm foo ls -li / | grep file
23744516 -rw-rw-r--    1 root     root            21 Mar 30 20:08 Containerfile
23744517 -rw-rw-r--    1 root     root             0 Mar 30 20:08 file1
23744518 -rw-rw-r--    1 root     root             0 Mar 30 20:08 file2
23744519 -rw-rw-r--    1 root     root             0 Mar 30 20:08 file3

Note that all inodes are different (expected: same for fileN), and each file's hard link count is 1 (expected: 3).

Works as expected with buildah and with non-remote podman. This almost certainly has to do with the copying of the context directory.

@edsantiago edsantiago added kind/bug Categorizes issue or PR as related to a bug. remote Problem is in podman-remote labels Mar 30, 2021
@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@edsantiago
Copy link
Member Author

Still present.

@rhatdan
Copy link
Member

rhatdan commented May 20, 2021

@nalind Is this the tar ball command not maintaining the hard links?

@nalind
Copy link
Member

nalind commented May 20, 2021

If it's going through pkg/bindings/images.nTar(), then yes, it needs to be extended to recognize hard links.

rhatdan added a commit to rhatdan/podman that referenced this issue May 22, 2021
mheon pushed a commit to mheon/libpod that referenced this issue May 25, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants