-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add a builder
image
#2
base: master
Are you sure you want to change the base?
Conversation
Optimised the `bake.sh` script to enable running it on an already baked image to add images to it without adding new copies of existing images. This is done by avoiding deletion of the Vagrant box files and instead making hard-links between the copies of the Vagrant images in the $VAGRANT_HOME directory to the copies in the libvirt storage pool. Also enabled a 'box-only` bake mode that allows creating images that contain cached cipies of Vagrant boxes without also containing pre-configured VMs. This allows creating families of images that contain different VM configurations but all share the layer that contain the large Box image file. Along the way also removed some packages from the base image that caused security alerts to show up in quay.io. Signed-off-by: Barak Korren <[email protected]>
Add files for creating a `builder` container image that can be used for building images with Vagrant environments in them based on the `base` image. The builder image is essentially the `base` image with `skopeo` and `buildah` added and with a `derive.sh` script that lets one `bake` images without having to run the image being built as a container inside the image that is building it. The builder image image accomplishes this feat by bind-mounting the locations inside the image being build that store VM and Vagrant-related information onto itself and them running the `bake.sh` script ao tha that baked image ends up being stored in the built image. The builder image also supports pushing the built images to a remote container repository. During the build process, the builder image stores intermediate container data in a hidden directory in the /workspace directory which should be a mounted volume. Since it is likely that the Vagrant application data will also come from that directory, the `bake.sh` script in the base image had been changed to not copy hidden files into the Vagrant environment. Signed-off-by: Barak Korren <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README file is missing. There is already a repo which does something similar.
I know about the work that was previously done WRT running Vagrant in a container, the work here already supersedes it in many ways |
Then, what is the value in starting a new repo? |
The code here is not technically derived from the code in the other repo, so putting it there would have not be useful for understanding it, also the name of the other repo includes "systemd" while this project intentionally eschews using it. |
Add files for creating a
builder
container image that can be used forbuilding images with Vagrant environments in them based on the
base
image.
The builder image is essentially the
base
image withskopeo
andbuildah
added and with aderive.sh
script that lets onebake
images without having to run the image being built as a container inside
the image that is building it.
The builder image image accomplishes this feat by bind-mounting the
locations inside the image being build that store VM and Vagrant-related
information onto itself and them running the
bake.sh
script ao thathat baked image ends up being stored in the built image.
The builder image also supports pushing the built images to a remote
container repository.
During the build process, the builder image stores intermediate
container data in a hidden directory in the /workspace directory which
should be a mounted volume. Since it is likely that the Vagrant
application data will also come from that directory, the
bake.sh
script in the base image had been changed to not copy hidden files into
the Vagrant environment.