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

Offer the parser as a separate package #119

Closed
lorenzo opened this issue Nov 23, 2017 · 13 comments
Closed

Offer the parser as a separate package #119

lorenzo opened this issue Nov 23, 2017 · 13 comments

Comments

@lorenzo
Copy link
Member

lorenzo commented Nov 23, 2017

Would you be interested in offering a separate package with a parser and a pretty printer for the Dockerfile?

I've been working on this separate parser package lately, and I think it would make great sense if we cooperated.

I can do any extra work you consider necessary to help this project transition in that direction.

@zemanlx
Copy link
Member

zemanlx commented Nov 24, 2017

@lorenzo Thanks for your interest!

To be honest I do not know what does it mean for hadolint? Can you give us some examples what we can get from using your package in examples, please? I am not really Haskell developer so the information in the package README is a bit cryptic for me.

@lorenzo
Copy link
Member Author

lorenzo commented Nov 25, 2017

Hi @zemanlx thanks for your response.

This does not mean too much for hadolint, but it would mean a great deal for the Haskell ecosystem. There are many other tools that can benefit from having a Dockerfile parser package available, without having to pull all the hadolint dependencies. One example of such tools is this one: https://github.com/seatgeek/docker-build-cacher

I'm opening this ticket, because for building that tool I used a fork of hadolint in order to use the Dockerfile parser, but the fork was not getting any improvements or fixes done by the hadolint team. The idea is to have a single source or truth, only one Dockerfile parser project that hadolint and other projects can use and keep up to date as a common effort.

The parser project I posted at the start of this thread also offers a way to write docker files dynamically as a DSL, and also offers a pretty printer. All this comes almost for free because of the work done by hadolint's parser.

My proposal is to maintain the parser separately and then build tools around it, one of them being hadolint. Other possible tools that can benefit from this are a dockerfile formatter and a templater.

@zemanlx
Copy link
Member

zemanlx commented Nov 27, 2017

@lorenzo in general, that sounds like a good idea. I would love not to do things twice, but I am just bit worried about speed that you can support upstream repo beijaflor-io/haskell-language-dockerfile.

I see that you just picked it up recently and I do not see any support for new things in Dockerfile format like multistage builds, protocol in EXPOSE, etc. Which is the same state as we have in hadolint, but they are at least under my control 😉 What is your relation/power to the upstream @lorenzo?

What is your opinion @lukasmartinelli?

@lorenzo
Copy link
Member Author

lorenzo commented Nov 27, 2017

In case the upstream maintainer does not respond, I would create a separate repo. I also plan to give hadolint maintainers full access to the repo, even ownership is preferred, so we can all collaborate in keeping things up to date.

You are right in that the forked order has no new things added, I actually just brought it up to date with the latest changes in hadolint, this is just a starting point.

Multi stage dockerfile is already supported, there is no need to modify the parser for that, but it could improve by supporting the aliasing of the image names. I’d like to do that next.

Just to reiterate, I don’t want any special control in the separate library, that can still be retained by the hadolint team, I could contribute outside of that by sending pull requests. My interest is in having a single source of truth and to not duplicate efforts.

@lukasmartinelli
Copy link
Collaborator

Would it help to create an organization for hadolint and split out the repositories?

/cc @lorenzo @zemanlx

Also reflects the ownership better.

@zemanlx
Copy link
Member

zemanlx commented Nov 28, 2017

@lukasmartinelli @lorenzo should we try to get beijaflor-io/haskell-language-dockerfile into this org or fork it? I believe that it should point to hackage/language-dockerfile to be useful for Haskell community or is it reasonable to create another package @lorenzo?

@lorenzo
Copy link
Member Author

lorenzo commented Nov 28, 2017

I’ll try to reach to the author and see if he is willing to join. I tried sending a pull request already and seems unresponsive, but I’ll try now more direct messages.

Thanks for moving fast with this!

@lorenzo
Copy link
Member Author

lorenzo commented Dec 1, 2017

I contacted the original creator of the separate parser package but haven't received any answer so far. Will give it a few more days before continuing without him

@zemanlx
Copy link
Member

zemanlx commented Dec 11, 2017

@lorenzo How long do you want to wait?

@lorenzo
Copy link
Member Author

lorenzo commented Dec 11, 2017

I'll do it this week, probably tomorrow. Since the original author did not respond I will have to choose a different namespace for the modules and also a different package name.

The current package name is language-dockerfile, my suggestion is language-docker Is that sensible?

@zemanlx
Copy link
Member

zemanlx commented Dec 11, 2017

👍 for language-docker

@lorenzo
Copy link
Member Author

lorenzo commented Dec 12, 2017

@lorenzo
Copy link
Member Author

lorenzo commented Dec 13, 2017

This was done, closing

@lorenzo lorenzo closed this as completed Dec 13, 2017
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

3 participants