I was put off releasing a pre-built docker image for an open source project, mainly due to mess of licenses that is Docker.
I finally decided to do it by doing the following (for a Python-based application):
* Create a LICENSE.third-party file, containing information about where to find LICENSES for the installed third-party applications (https://github.com/MatthewJohn/terrareg/blob/main/LICENSE.third-party)
* Use pip-licenses to generate per-package license files for each of the installed pip packages (https://github.com/MatthewJohn/terrareg/blob/main/Dockerfile#L77)
* Copied all 'doc' license files from deb packages to common directory (https://github.com/MatthewJohn/terrareg/blob/main/Dockerfile#L80C1-L80C173)
* Manually copy licenses for tooling that is installed in the Docker build (https://github.com/MatthewJohn/terrareg/blob/main/Dockerfile#L82)
I'm wondering if anyone else has tackled this and/or seen it done anywhere else?
How have others implemented anything similar?
Thanks! :)
I've been working on (what turned out to be a fairly large) proof of concept open source Terraform Cloud/Enterprise alternative, Terrarun.
Over the past weekend, I've been adding support for the official Hashicorp Cloud agent, which is now working.
The entire project is fairly hacky at the moment (lacking tests, a good UI etc.) - partially because has to constantly change as I learn more things whilst implementing their APIs.
This particular adventure has been particularly note-worthy, given there is _no_ documentation for the agent APIs and, given that I haven't signed up for a Hashicorp Cloud account, absolutely no knowledge about how the communication _should_ work, without trial-and-error and cryptic messages :D
Hopefully if anyone else is trying to do the same, they can use as "some sort" of a reference to see how the APIs should work (though, I'm not saying they're absolutely complete - the agent seems to be a little lax on missing attributes)
Needless to say, I could find absolutely no resources, so hopefully this will help someone at some point :D
https://github.com/MatthewJohn/terrarun/commit/5900c7bfed6c4f66cb71ac84f694eb5003187039
(and yes, apologies for the license littered across the code, I've been meaning to fix it - I've previously preferred to provide a "real" open source license when a project is at the point I think it's usable, stable/trustworthy and something people might want to run/fork)
Many thanks :)