diff --git a/api/swagger.yaml b/api/swagger.yaml index 3991437e67..a8b4b553c0 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -1452,6 +1452,10 @@ definitions: - Env - Args properties: + DockerVersion: + description: "Docker Version used to create the plugin" + type: "string" + x-nullable: false Description: type: "string" x-nullable: false diff --git a/api/types/plugin.go b/api/types/plugin.go index 14f0f956be..ed3c2c26e4 100644 --- a/api/types/plugin.go +++ b/api/types/plugin.go @@ -42,6 +42,9 @@ type PluginConfig struct { // Required: true Description string `json:"Description"` + // Docker Version used to create the plugin + DockerVersion string `json:"DockerVersion,omitempty"` + // documentation // Required: true Documentation string `json:"Documentation"` diff --git a/plugin/backend_linux.go b/plugin/backend_linux.go index 31587efbe6..8924daa996 100644 --- a/plugin/backend_linux.go +++ b/plugin/backend_linux.go @@ -24,6 +24,7 @@ import ( "github.com/docker/docker/distribution" progressutils "github.com/docker/docker/distribution/utils" "github.com/docker/docker/distribution/xfer" + "github.com/docker/docker/dockerversion" "github.com/docker/docker/image" "github.com/docker/docker/layer" "github.com/docker/docker/pkg/chrootarchive" @@ -758,6 +759,8 @@ func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.ReadCloser, DiffIds: []string{layerDigester.Digest().String()}, } + config.DockerVersion = dockerversion.Version + configBlob, err := pm.blobStore.New() if err != nil { return err