Skip to content
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 support for image registry proxies #2893

Merged
merged 7 commits into from Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions ducc/cmd/root.go
Expand Up @@ -24,6 +24,7 @@ var rootCmd = &cobra.Command{
Short: "Show the several commands available.",
PersistentPreRun: func(cmd *cobra.Command, args []string) {
lib.SetupNotification()
lib.SetupRegistries()
},
Run: func(cmd *cobra.Command, args []string) {
cmd.Help()
Expand Down
17 changes: 17 additions & 0 deletions ducc/docker-api/util.go
Expand Up @@ -27,6 +27,23 @@ type Manifest struct {
Layers []Layer
}

type ManifestList struct {
SchemaVersion int
MediaType string
Manifests []ManifestListItem
}

type ManifestListItem struct {
MediaType string
Size int
Digest string
Platform struct {
Architecture string
OS string
Variant *string
}
}

type ThinImageLayer struct {
Digest string `json:"digest"`
Url string `json:"url,omitempty"`
Expand Down
6 changes: 3 additions & 3 deletions ducc/lib/conversion.go
Expand Up @@ -318,11 +318,11 @@ func convertInputOutput(inputImage *Image, repo string, convertAgain, forceDownl
}
manifestPath := filepath.Join("/", "cvmfs", repo, ".metadata", inputImage.GetSimpleName(), "manifest.json")
alreadyConverted := AlreadyConverted(manifestPath, manifest.Config.Digest)
l.Log().WithFields(log.Fields{"alreadyConverted": alreadyConverted}).Info(
"Already converted the image, skipping.")

if alreadyConverted == ConversionMatch {
if convertAgain == false {
if !convertAgain {
l.Log().WithFields(log.Fields{"alreadyConverted": alreadyConverted}).Info(
"Already converted the image, skipping.")
return nil
}
}
Expand Down