Newbie: Trying to use the haishicorp/packer container

I am working through creating vagrant boxes using the packer container found on Dockerhub. I took a json file created by Jeff Geerling as a place to start. The hashicorp web site tutorials were a bit confusing, so I started working with a configuration closer to what I want to accomplish.

I like the idea of using the docker container. I was able to convert the json template to hcl2 using the upgrade cli command, made changes in the template to include downloading the vagrant plugin, but when ran the build command, I got an error saying it could not find the VBoxManage executable. I tried several ways to solve it, and by creating a container and copying in the executable, I was able to make it run, but still had errors saying it could not find the v-box guest additions.

When I installed packer on my laptop (POP_OS 21.10), I was successfully able to build the vm and vagrant was able to launch it.

I tried searching the internet looking for examples like Jeff’s but using HCL templates and the packer docker container, but have not found any information or examples.

I am working through the issues, but if someone has already solved them, I would not mind accelerating my learning.