Remove deprecated -f flag on docker tag
The -f flag on docker tag has been deprecated in docker 1.10 and is expected to be removed in docker 1.12. This fix removed the -f flag on docker tag and also updated deprecated.md. NOTE: A separate pull request for engine-api has been opened to cover the related changes. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: 4455ec14b87d5ad474c5e11d60907bceb35e9e09 Component: engine
This commit is contained in:
@@ -240,7 +240,7 @@ func (s *DockerSuite) TestImagesEnsureDanglingImageOnlyListedOnce(c *check.C) {
|
||||
imageID := stringid.TruncateID(strings.TrimSpace(out))
|
||||
|
||||
// overwrite the tag, making the previous image dangling
|
||||
dockerCmd(c, "tag", "-f", "busybox", "foobox")
|
||||
dockerCmd(c, "tag", "busybox", "foobox")
|
||||
|
||||
out, _ = dockerCmd(c, "images", "-q", "-f", "dangling=true")
|
||||
// Expect one dangling image
|
||||
|
||||
@@ -658,7 +658,7 @@ func (s *DockerSuite) TestPsImageIDAfterUpdate(c *check.C) {
|
||||
out, _, err = runCommandWithOutput(runCmd)
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
runCmd = exec.Command(dockerBinary, "tag", "-f", updatedImageName, originalImageName)
|
||||
runCmd = exec.Command(dockerBinary, "tag", updatedImageName, originalImageName)
|
||||
out, _, err = runCommandWithOutput(runCmd)
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
|
||||
@@ -86,19 +86,6 @@ func (s *DockerSuite) TestTagExistedNameWithoutForce(c *check.C) {
|
||||
dockerCmd(c, "tag", "busybox:latest", "busybox:test")
|
||||
}
|
||||
|
||||
// tag an image with an existed tag name with -f option should work
|
||||
func (s *DockerSuite) TestTagExistedNameWithForce(c *check.C) {
|
||||
// Don't attempt to pull on Windows as not in hub. It's installed
|
||||
// as an image through .ensure-frozen-images-windows
|
||||
if daemonPlatform != "windows" {
|
||||
if err := pullImageIfNotExist("busybox:latest"); err != nil {
|
||||
c.Fatal("couldn't find the busybox:latest image locally and failed to pull it")
|
||||
}
|
||||
}
|
||||
dockerCmd(c, "tag", "busybox:latest", "busybox:test")
|
||||
dockerCmd(c, "tag", "-f", "busybox:latest", "busybox:test")
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestTagWithPrefixHyphen(c *check.C) {
|
||||
// Don't attempt to pull on Windows as not in hub. It's installed
|
||||
// as an image through .ensure-frozen-images-windows
|
||||
|
||||
Reference in New Issue
Block a user