This repository was archived by the owner on Sep 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 11package image
22
3- import "github.com/docker/docker/layer"
3+ import (
4+ "runtime"
5+
6+ "github.com/docker/docker/layer"
7+ )
48
59// TypeLayers is used for RootFS.Type for filesystems organized into layers.
610const TypeLayers = "layers"
711
12+ // typeLayersWithBase is an older format used by Windows up to v1.12. We
13+ // explicitly handle this as an error case to ensure that a daemon which still
14+ // has an older image like this on disk can still start, even though the
15+ // image itself is not usable. See https://github.com/docker/docker/pull/25806.
16+ const typeLayersWithBase = "layers+base"
17+
818// RootFS describes images root filesystem
919// This is currently a placeholder that only supports layers. In the future
1020// this can be made into an interface that supports different implementations.
@@ -25,5 +35,8 @@ func (r *RootFS) Append(id layer.DiffID) {
2535
2636// ChainID returns the ChainID for the top layer in RootFS.
2737func (r * RootFS ) ChainID () layer.ChainID {
38+ if runtime .GOOS == "windows" && r .Type == typeLayersWithBase {
39+ return ""
40+ }
2841 return layer .CreateChainID (r .DiffIDs )
2942}
You can’t perform that action at this time.
0 commit comments