Skip to content

Commit

Permalink
Merge pull request containers#606 from cdoern/imgPlatformFeature
Browse files Browse the repository at this point in the history
made necessary changes to handle OS/Arch while importing an image
  • Loading branch information
openshift-merge-robot authored Jun 8, 2021
2 parents e14278a + ed87b61 commit 1ba176c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions libimage/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ type ImportOptions struct {
CommitMessage string
// Tag the imported image with this value.
Tag string
// Overwrite OS of imported image.
OS string
// Overwrite Arch of imported image.
Arch string
}

// Import imports a custom tarball at the specified path. Returns the name of
Expand All @@ -48,8 +52,10 @@ func (r *Runtime) Import(ctx context.Context, path string, options *ImportOption
}

config := v1.Image{
Config: ic,
History: hist,
Config: ic,
History: hist,
OS: options.OS,
Architecture: options.Arch,
}

u, err := url.ParseRequestURI(path)
Expand Down

0 comments on commit 1ba176c

Please sign in to comment.