hashicorp / hashicorp/packer-plugin-lxc
Configure rootfs export to not include `rootfs/` in the output .tar.gz
- Dominant language
- Go
- Stars
- 7
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
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](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) 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
Contributor guide
Assessment
This issue has not been assessed yet.