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

Comments are deleted #12

Open
huonw opened this issue Jan 31, 2019 · 1 comment
Open

Comments are deleted #12

huonw opened this issue Jan 31, 2019 · 1 comment

Comments

@huonw
Copy link

huonw commented Jan 31, 2019

It seems like comments get removed entirely from a Dockerfile:

FROM scratch
# a comment
$ dockfmt-darwin-amd64 fmt Dockerfile 
	
FROM	scratch

I'd love to use this, but I need to preserve comments.

@m4ns0ur
Copy link

m4ns0ur commented Oct 9, 2019

@huonw the library used as Docker parser (moby/buildkit) is striping the comments.
Anyways if you put the comment at the end of command lines, parser will preserve it:

FROM scratch # a comment

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

No branches or pull requests

2 participants