Skip to content

Documentation for how to use 'docker tag' on command line confusing #3674

Description

@davewichers

File: something like: engine/reference/commandline/tag.md (This the location in a downstream repo. Not sure about this one.)

This documentation is confusing because it says:

docker tag
Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

Usage
docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]

Notice that the docker tag explanation and the Usage of the TARGET/SOURCE images backwards from each other.

And when you run: docker it outputs the line: tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
but when you run docker tag, it says: Usage: docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]

So. if you simply run docker tag TARGET_IMAGE[:TAG] SOURCE_IMAGE[:TAG], which is how the 1st example plains how to use it, it breaks.

I suggest you rewrite this page to instead say something like:

docker tag
Reference SOURCE_IMAGE to create the tag TARGET_IMAGE

Usage
docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]

And also update this same documentation when running just: docker

That way the SOURCE/TARGET are in the same order, reducing confusion. And this doesn't break the command at all as its simply a documentation change. I do admit that this new language is a bit awkward, but having the params in the right order is important.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions