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

Dockerfile: update comments #2852

Merged
merged 1 commit into from
May 6, 2022

Conversation

tonistiigi
Copy link
Member

Improve Dockerfile after testing outline with #2841

Signed-off-by: Tonis Tiigi [email protected]

@@ -6,14 +6,15 @@ ARG CONTAINERD_VERSION=v1.6.3
ARG CONTAINERD_ALT_VERSION_15=v1.5.11
# containerd v1.4 for integration tests
ARG CONTAINERD_ALT_VERSION_14=v1.4.13
# available targets: buildkitd, buildkitd.oci_only, buildkitd.containerd_only
# BUILDKIT_TARGET defines buildkitd worker mode (buildkitd, buildkitd.oci_only, buildkitd.containerd_only)
Copy link
Member

Choose a reason for hiding this comment

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

So IIUC, "outline" uses a GoDoc-like approach <thing> does <x> and ignores other comments? Or are they still printed even if they don't start with <thing> (name of ARG)? #2841

We should probably document that somewhere that that's the convention to use (perhaps we can borrow some of the description from Golang)

Copy link
Member

@crazy-max crazy-max May 6, 2022

Choose a reason for hiding this comment

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

I think #2841 takes whatever comment is put for an arg or stage as description. I agree that we should have a markup like GoDoc. See #2841 (comment) for a use case.

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha; makes sense.

I guess with the ARGNAME <description> approach, we'd be able to have separate descriptions for arguments, even if multiple are defined at once (ARG ONE=one TWO=two)

Copy link
Member Author

Choose a reason for hiding this comment

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

Same as Godoc. Applies to args and stages.

Copy link
Member Author

Choose a reason for hiding this comment

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

Signed-off-by: Tonis Tiigi <[email protected]>
@tonistiigi tonistiigi force-pushed the dockerfile-comments-upt branch from b0698a6 to 50e677e Compare May 6, 2022 16:05
@tonistiigi tonistiigi merged commit 79483e1 into moby:master May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants