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

Mount image filesystem #1433

Closed
lachmanfrantisek opened this issue Sep 10, 2018 · 23 comments
Closed

Mount image filesystem #1433

lachmanfrantisek opened this issue Sep 10, 2018 · 23 comments
Assignees
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@lachmanfrantisek
Copy link

Is this a BUG REPORT or FEATURE REQUEST?:

/kind feature

Description

It would be nice to be able to mount the filesystem of the image with podman mount.

Is there some easy way to achieve this? (Now, I am doing podman create + podman mount.)

Thanks.

@mheon
Copy link
Member

mheon commented Sep 10, 2018

This is possible with containers/storage, though I believe the mounts will have to be read-only given that there's no container associated with them - if you want to alter the filesystem and make new images, you could have to create a container and podman commit after mounting and changing.

@lachmanfrantisek
Copy link
Author

@mheon Thanks, the read-only state is what I need.

For now, podman create+podman mount is easier than building the containers-storage cli.

It would be nice to have it in podman mount directly. (in the future)

@rhatdan
Copy link
Member

rhatdan commented Sep 11, 2018

@nalind WDYT?

@sghosh151
Copy link

Would be nice to be able to do this inside a container.
usage: Deploy a container scanning tool in a image - image receives API call, downloads image (ephemeral), mounts image, examines filesystems - returns result on API

@mheon
Copy link
Member

mheon commented Sep 25, 2018

Rootless podman inside of the container should do what you need once mounting images is implemented, especially given there's no real need to share storage between podman in the image and podman outside of the image.

@rhatdan
Copy link
Member

rhatdan commented Sep 26, 2018

Right, you can do this now by just running podman inside of container.

@baude
Copy link
Member

baude commented Dec 4, 2018

should we just implement this with a container create and a mount?

@mheon
Copy link
Member

mheon commented Dec 4, 2018

Do we need to? I think c/storage might support mounting images already, in which case it's just wiring up a command to do the heavy lifting

@rhatdan
Copy link
Member

rhatdan commented Mar 8, 2019

@nalind How hard would this be to do? Just mount the image layer Read/Only?

@rhatdan
Copy link
Member

rhatdan commented Apr 13, 2019

I think this could be done, fairly easily but we would need interfaces added to containers/storage to mount an image read/only with no upper container.
If someone wants to look into this it would be great.

@rhatdan
Copy link
Member

rhatdan commented Aug 5, 2019

Still no one has worked on this one for a year. I am adding some support for mounting container storage read/only in containers/storage#404

@kunalkushwaha
Copy link
Collaborator

If no one is working on this, I can work on this.

I think this could be done, fairly easily but we would need interfaces added to containers/storage to mount an image read/only with no upper container.

Can this be done with a dummy container config without new top layer, which will be deleted with umount?

@rhatdan
Copy link
Member

rhatdan commented Sep 19, 2019

It could be, but it would seem better to just be able to mount the image read/only.

@vrothberg
Copy link
Member

@kunalkushwaha, are you planning to work on that?

I'm going through old issues and do some cleanups.

@kunalkushwaha
Copy link
Collaborator

Hi @vrothberg Yes, I started working on this now.

/assign

@github-actions
Copy link

github-actions bot commented Nov 5, 2019

This issue had no activity for 30 days. In the absence of activity or the "do-not-close" label, the issue will be automatically closed within 7 days.

@rhatdan
Copy link
Member

rhatdan commented Nov 5, 2019

@kunalkushwaha I still working on this, correct?

@kunalkushwaha
Copy link
Collaborator

@rhatdan Yes, I am working on this.
The containers/storage#438 & #4209 PRs to fix this issue.

Once c/storage have ImageMount() interface, #4209 can be fixed.

@rhatdan
Copy link
Member

rhatdan commented Feb 17, 2020

The storage PR needs a rebase.

@rhatdan
Copy link
Member

rhatdan commented Jun 9, 2020

@ashley-cui PTAL

@github-actions
Copy link

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

@rhatdan
Copy link
Member

rhatdan commented Jul 10, 2020

I have a PR up for this one. #6851

@baude
Copy link
Member

baude commented Sep 2, 2020

this can now be done by podman

@baude baude closed this as completed Sep 2, 2020
@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants