docker / docker/cli

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

Open
#3,674 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/docs kind/enhancement
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the tag documentation near engine/reference/commandline/tag.md and compare its wording with the output from running docker and docker tag. Done means the SOURCE_IMAGE and TARGET_IMAGE order is consistent in both help text and documentation, without changing command behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
cli, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.