mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Update code for latest engine-api
- Update CopyToContainer uses - Use engine-api/types/versions instead of pkg/version Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
04bb3a2f45
commit
7534f17261
20 changed files with 51 additions and 56 deletions
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/docker/distribution/digest"
|
||||
"github.com/docker/docker/image"
|
||||
"github.com/docker/docker/layer"
|
||||
"github.com/docker/docker/pkg/version"
|
||||
"github.com/docker/engine-api/types/versions"
|
||||
)
|
||||
|
||||
var validHex = regexp.MustCompile(`^([a-f0-9]{64})$`)
|
||||
|
|
@ -19,7 +19,7 @@ var validHex = regexp.MustCompile(`^([a-f0-9]{64})$`)
|
|||
// noFallbackMinVersion is the minimum version for which v1compatibility
|
||||
// information will not be marshaled through the Image struct to remove
|
||||
// blank fields.
|
||||
var noFallbackMinVersion = version.Version("1.8.3")
|
||||
var noFallbackMinVersion = "1.8.3"
|
||||
|
||||
// HistoryFromConfig creates a History struct from v1 configuration JSON
|
||||
func HistoryFromConfig(imageJSON []byte, emptyLayer bool) (image.History, error) {
|
||||
|
|
@ -77,7 +77,7 @@ func MakeConfigFromV1Config(imageJSON []byte, rootfs *image.RootFS, history []im
|
|||
return nil, err
|
||||
}
|
||||
|
||||
useFallback := version.Version(dver.DockerVersion).LessThan(noFallbackMinVersion)
|
||||
useFallback := versions.LessThan(dver.DockerVersion, noFallbackMinVersion)
|
||||
|
||||
if useFallback {
|
||||
var v1Image image.V1Image
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue