-
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
Adding some more pre-baked images #3
Open
ifireball
wants to merge
7
commits into
no-name-yet:master
Choose a base branch
from
ifireball:baked-boxes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>
Fixed an issue with the argument parsing code of `bake.sh` where it would not properly detect the situation where optional flags were passed after the positional arguments had been given. Also improved the logging in `bake.sh` so it does not just dump everything to stderr and instead only shows the most important commands being run. Signed-off-by: Barak Korren <[email protected]>
Given the way `derive.sh` works where it mounts different parts of the built container into the builder container, sometimes the hard-linking of vagrant box files to libvirt image files done by `bake.sh` fails. This patch adds a second attempt at hard-linking that is done by `derive.sh` directly on the mount point of the built container image. Also moved the image publishing code out of `derive.sh` to a separate generally usable `publish.sh` script with additional functionality. This patch also includes a slight improvement to the output management of `derive.sh` to make it not show some unimportant things. Signed-off-by: Barak Korren <[email protected]>
Added a build script that is meant to build all the images in this repository automatically. The script is meant to be run inside a builder container, if it is not run inside such a container the script attempts to launch such a container and invoke itself inside it. This script accepts parameters that tell it where to push the images it builds. Those are similar to the parameters one acn pass to `publish.sh`. Since the build process is likely to generate files in the source directory, added those files to the `.gitgnore` file. Signed-off-by: Barak Korren <[email protected]>
Changing this because `buildah push` has a 3rd parameter that provides the same features as `skopeo copy` but it also supports the REGISTRY_AUTH_FILE environment variable. Signed-off-by: Barak Korren <[email protected]>
Adding an image that contains the CentOS 7 Vagrant box and another that contain both the CentOS7 and the CentOS8 boxes. Signed-off-by: Barak Korren <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding an image that contains the CentOS 7 Vagrant box and another that
contain both the CentOS7 and the CentOS8 boxes.