Typo in Documentation: Incorrect Description for Docker Run

I found a typo in the documentation about the --rm flag. in the Docker Run reference documentation. The current documentation says that:

…If you want Docker to automatically clean up the container and remove the filesystem when the container exits, use the --rm flag:

And you have this example:

–rm=false: automatically removes the container when it exits

So, the --rm=false flag prevents containers from being automatically removed when they exit. If you want containers to be automatically removed when they exit, you should use --rm=true instead.

The documentation fails by adding false to the --rm flag when it should be true

I’m not much of a contributor and I was researching trying to make a pull request for this bug but I noticed that the repo where I should make PRs is not that active in their PRs and even less with this type of bugs so I don’t think I’ll see it.

Where do you think I should report to have this little error in the documentation fixed?

Good catch. --rm=false could indicate a default value, but when you provide --rm the default is actually true. And I never used the value. I always used it as a flag.

This is the repository where you can report documentation issues:

On most pages there is a “Request changes” link but it is not there on the docker run reference page:

https://docs.docker.com/reference/cli/docker/container/run/

and the Docker engine reference for Docker run uses --rm only as a flag

https://docs.docker.com/engine/reference/run/

I clicked on a “Request changes” link on the engine reference page and changed the “location” parameter in the URL that fills the “location” input field, so you could try this link to report the issue:

https://github.com/docker/docs/issues/new?template=doc_issue.yml&location=https%3A%2F%2Fdocs.docker.com%2Freference%2Fcli%2Fdocker%2Fcontainer%2Frun%2F&labels=status%2Ftriage

But when you click on the “New issue” button in the repository i will guide you through reporting documentation issues.

In fact, that was the first place I went, I tried to find the path of the content.md to modify it and make a PR and I found it:

https://github.com/docker/docs/blob/main/content/reference/cli/docker/container/run.md?plain=1

But the content is not there and only this comment appears:

<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket or pull request
in the source repository on GitHub:
-->

So it sends me here:

https://github.com/docker/cli

And that’s where I came to this forum to ask, because as I said, the PRs in that place are of another type and I didn’t find any with the label: “docs/revisit”

My question is, would it be good to make a “New Issue” or modify it and send it as a PR and in which of the 2 repos because I have the feeling that since it is a very small error they will ignore it.

1 Like

That could be the reason why the “Request changes” link is not available for that. It is a little confusing, but it actually makes sense as the docker run --help would return part of it, but not everything as it does not show examples. There is also the moby repository which is the base of Docker

And a user would not know in which one would they need to open the issue.

I think you could send open the issue in any of the repositories as long as the repository is relevant (I would not go to a Docker Desktop repository) and the developers can guide you to the right direction or move the issue to the right one for you if they recognize it as a real issue. The best would be of course a link on each of the documentation pages not just on some pages.

If you ask me, I would open the issue just because that seems to be the obvious one without the need to understand the whole source code which could be obvious to a developer but not for someone else. And when you run the docker run --help command, there is no issue there.

PR is good when you know where the relevant source code is. You could open an issue in the docs repo and offer to send a pull request if they share where the source code is.

1 Like

Thanks for your help.

I’ll try to do that last one

Update: I submitted a PR with changes to fix the documentation and they were approved.

Details: Docs: Fix --rm=false flag in container_run.md by juliogarciape · Pull Request #5435 · docker/cli · GitHub

1 Like