-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46539 from TBBle/containerd_image_store_pr46402
c8d: Just enough Windows support to run the test suite
- Loading branch information
Showing
13 changed files
with
153 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//go:build linux || freebsd | ||
|
||
package containerd | ||
|
||
import ( | ||
"github.com/docker/docker/errdefs" | ||
"github.com/docker/docker/image" | ||
"github.com/docker/docker/layer" | ||
"github.com/pkg/errors" | ||
) | ||
|
||
// GetLayerFolders returns the layer folders from an image RootFS. | ||
func (i *ImageService) GetLayerFolders(img *image.Image, rwLayer layer.RWLayer, containerID string) ([]string, error) { | ||
return nil, errdefs.NotImplemented(errors.New("not implemented")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package containerd | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/docker/docker/image" | ||
"github.com/docker/docker/layer" | ||
"github.com/pkg/errors" | ||
) | ||
|
||
// GetLayerFolders returns the layer folders from an image RootFS. | ||
func (i *ImageService) GetLayerFolders(img *image.Image, rwLayer layer.RWLayer, containerID string) ([]string, error) { | ||
if rwLayer != nil { | ||
return nil, errors.New("RWLayer is unexpectedly not nil") | ||
} | ||
|
||
snapshotter := i.client.SnapshotService(i.StorageDriver()) | ||
mounts, err := snapshotter.Mounts(context.TODO(), containerID) | ||
if err != nil { | ||
return nil, errors.Wrapf(err, "snapshotter.Mounts failed: container %s", containerID) | ||
} | ||
|
||
// This is the same logic used by the hcsshim containerd runtime shim's createInternal | ||
// to convert an array of Mounts into windows layers. | ||
// See https://github.com/microsoft/hcsshim/blob/release/0.11/cmd/containerd-shim-runhcs-v1/service_internal.go | ||
parentPaths, err := mounts[0].GetParentPaths() | ||
if err != nil { | ||
return nil, errors.Wrapf(err, "GetParentPaths failed: container %s", containerID) | ||
} | ||
return append(parentPaths, mounts[0].Source), nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters