Skip to content

Resolve base image location#115

Merged
idroz merged 6 commits intobravetools:masterfrom
Szubie:resolve-image-location
Aug 5, 2022
Merged

Resolve base image location#115
idroz merged 6 commits intobravetools:masterfrom
Szubie:resolve-image-location

Conversation

@Szubie
Copy link
Collaborator

@Szubie Szubie commented Jul 27, 2022

At the moment it is mandatory to specify the base image location in the bravefile. Ideally this would not be necessary - it should not matter where the image is stored. The user should simply declare which image they want and the tool should automatically retrieve it in the smartest way possible.

This PR allows bravetools to infer image location by itself if not provided. First it will check the local image store for the image, before searching the public LXD image repo. GitHub images are identified by the presence of the "github.com/" prefix, just like when using the brave base command.

The "location" field still exists as an optional field - when specified it takes precedence over the above image location resolution logic, so this change is backwards compatible with existing Bravefiles. This allows the user to override the retrieval logic if necessary, but otherwise they can avoid twiddling with the Bravefile fields to account for whether image has been stored locally.

@Szubie Szubie force-pushed the resolve-image-location branch from 7afc47f to 37e36e8 Compare August 5, 2022 17:49
@idroz idroz merged commit 1b0c8d5 into bravetools:master Aug 5, 2022
@Szubie Szubie deleted the resolve-image-location branch September 3, 2022 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants