Skip to content

Commit

Permalink
Import base layer images
Browse files Browse the repository at this point in the history
If a project creates a base layer image and wants to directly import the base then this ensure the baseline file are in place.  It is a follow up to #1637 and enables containerd with ctr image import image.tar of a base layer.

Signed-off-by: James Sturtevant <[email protected]>
  • Loading branch information
jsturtevant committed Mar 7, 2023
1 parent dd66992 commit 4e0656f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/wclayer/importlayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ func NewLayerWriter(ctx context.Context, path string, parentLayerPaths []string)
if err != nil {
return nil, err
}

// ensure the required files are present in the base layer
_, err = ensureBaseLayer(f)
if err != nil {
return nil, err
}
return &baseLayerWriter{
ctx: ctx,
s: span,
Expand Down

0 comments on commit 4e0656f

Please sign in to comment.