Skip to content

Commit

Permalink
feat(cpio): Wait for oks in parallel
Browse files Browse the repository at this point in the history
Also prints statistics at the end and queries at start.

Signed-off-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
  • Loading branch information
craciunoiuc committed May 23, 2024
1 parent 99b9159 commit 3d21625
Show file tree
Hide file tree
Showing 3 changed files with 229 additions and 85 deletions.
4 changes: 4 additions & 0 deletions initrd/ociimage.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ type ociimage struct {

// NewFromOCIImage creates a new initrd from a remote container image.
func NewFromOCIImage(ctx context.Context, path string, opts ...InitrdOption) (Initrd, error) {
if _, err := os.Stat(path); err == nil {
return nil, fmt.Errorf("file with path %s already exists", path)
}

if !strings.Contains("://", path) {
path = fmt.Sprintf("docker://%s", path)
}
Expand Down
Loading

0 comments on commit 3d21625

Please sign in to comment.