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

Configure rootfs export to not include rootfs/ in the output .tar.gz #7

Open
awygle opened this issue Apr 28, 2021 · 1 comment
Open

Comments

@awygle
Copy link

awygle commented Apr 28, 2021

Please search the existing issues for relevant feature requests, and use the
reaction feature
(https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/)
to add upvotes to pre-existing requests.

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

I am using Packer to provision container templates for a Proxmox VE instance, and Proxmox expects that the input .tar.gz file containing the rootfs be "direct", for lack of a better word. That is, /bin/, /dev/, and the like should be at the top level of the archive rather than contained inside of a /rootfs/ folder.

Obviously I can work around this by doing a post-process step, but it's a bit cumbersome. I'd like a way to configure the export step which lets me solve this use case. (I'm assuming this needs to be more general than something to solve this very specific case, but maybe not.)

Use Case(s)

Proxmox containers is my current use case, although I'd not be surprised to learn there is other LXC-based infrastructure that has this same problem.

Potential configuration

Not really sure. Maybe adding a key like this to the builder config?

archive_directory = $containerDir/rootfs

That syntax definitely needs some work.

Potential References

@landorg
Copy link

landorg commented Sep 6, 2023

@awygle
hi :)
Could you please explain how you create rootfs images with packer with a short example?
I'd need something similar for Images for my hosting provider and can't figure out how to do than. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants