Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer long flags in quick start example #1029

Merged
merged 1 commit into from
Nov 8, 2021
Merged

Conversation

rootulp
Copy link
Contributor

@rootulp rootulp commented Jul 22, 2021

--detach is clearer (to a new Docker user) than -d. Similarly --volume is clearer than -v.

Motivation: https://changelog.com/posts/use-long-flags-when-scripting
Referred to: https://docs.docker.com/engine/reference/commandline/run/

`--detach` is clearer (to a new Docker user) than `-d`. Similarly `--volume` is clearer than `-v`.

Motivation: https://changelog.com/posts/use-long-flags-when-scripting
Referred to: https://docs.docker.com/engine/reference/commandline/run/
@codecov
Copy link

codecov bot commented Jul 25, 2021

Codecov Report

Merging #1029 (2da3edc) into main (7221704) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1029   +/-   ##
=======================================
  Coverage   59.63%   59.63%           
=======================================
  Files          22       22           
  Lines        1412     1412           
=======================================
  Hits          842      842           
  Misses        500      500           
  Partials       70       70           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7221704...2da3edc. Read the comment docs.

Copy link
Member

@piksel piksel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. It's clearer what every argument is doing, and if you already know what they do you probably also know the short hands (or you look them up if you care enough about make your commands shorter 😁)

@zoispag
Copy link
Member

zoispag commented Jul 25, 2021

I disagree here. All the docker examples I was finding and following on the internet when I was learning docker were ALWAYS using -d, -p, -v, -e, etc.
Even now, experienced in Docker, --detach reads funny and is unusual to see it, imho.

@piksel
Copy link
Member

piksel commented Jul 25, 2021

@zoispag Indeed. That's probably why they were used in the docs in the first place. I think the main problem is with people who just copy commands from the docs and try to modify them to suite their needs.
The whole command can be fairly opaque to someone who don't know what flags take an argument etc.
Usually, -v maps to --verbose for example, which doesn't take an argument. 🤷‍♀️

@rootulp
Copy link
Contributor Author

rootulp commented Jul 26, 2021

Usually, -v maps to --verbose for example, which doesn't take an argument. 🤷‍♀️

Agreed. I was similarly confused by this naming conflict. I think the longer format flags remove the risk of confusion.

@stale
Copy link

stale bot commented Oct 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale label Oct 2, 2021
@simskij simskij merged commit cb4e60c into containrrr:main Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants