Browse Source

Merge pull request #23273 from vdemeester/deprecated-import-3-args

Deprecated the old 3-args form of `docker import`
Sebastiaan van Stijn 9 years ago
parent
commit
3cec900271
2 changed files with 7 additions and 9 deletions
  1. 0 9
      api/client/import.go
  2. 7 0
      docs/deprecated.md

+ 0 - 9
api/client/import.go

@@ -1,7 +1,6 @@
 package client
 
 import (
-	"fmt"
 	"io"
 	"os"
 
@@ -31,19 +30,12 @@ func (cli *DockerCli) CmdImport(args ...string) error {
 
 	var (
 		in      io.Reader
-		tag     string
 		src     = cmd.Arg(0)
 		srcName = src
 		ref     = cmd.Arg(1)
 		changes = flChanges.GetAll()
 	)
 
-	if cmd.NArg() == 3 {
-		// FIXME(vdemeester) Which version has this been deprecated ? should we remove it ?
-		fmt.Fprintf(cli.err, "[DEPRECATED] The format 'file|URL|- [REPOSITORY [TAG]]' has been deprecated. Please use file|URL|- [REPOSITORY[:TAG]]\n")
-		tag = cmd.Arg(2)
-	}
-
 	if src == "-" {
 		in = cli.in
 	} else if !urlutil.IsURL(src) {
@@ -63,7 +55,6 @@ func (cli *DockerCli) CmdImport(args ...string) error {
 
 	options := types.ImageImportOptions{
 		Message: *message,
-		Tag:     tag,
 		Changes: changes,
 	}
 

+ 7 - 0
docs/deprecated.md

@@ -14,6 +14,13 @@ weight=80
 
 The following list of features are deprecated in Engine.
 
+### Three argument form in `docker import`
+**Deprecated In Release: [v0.6.7](https://github.com/docker/docker/releases/tag/v0.6.7)**
+
+**Removed In Release: [v1.12.0](https://github.com/docker/docker/releases/tag/v1.12.0)**
+
+The `docker import` command format 'file|URL|- [REPOSITORY [TAG]]' is deprecated since November 2013. It's no more supported.
+
 ### `-e` and `--email` flags on `docker login`
 **Deprecated In Release: [v1.11.0](https://github.com/docker/docker/releases/tag/v1.11.0)**