Hey all :)<p>I was put off releasing a pre-built docker image for an open source project, mainly due to mess of licenses that is Docker.<p>I finally decided to do it by doing the following (for a Python-based application):<p>* 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)<p>* 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)<p>* Copied all 'doc' license files from deb packages to common directory (https://github.com/MatthewJohn/terrareg/blob/main/Dockerfile#L80C1-L80C173)<p>* Manually copy licenses for tooling that is installed in the Docker build (https://github.com/MatthewJohn/terrareg/blob/main/Dockerfile#L82)<p>I'm wondering if anyone else has tackled this and/or seen it done anywhere else?<p>How have others implemented anything similar?<p>Thanks! :)
I'm not entirely sure, but here's an example of how Google does it: <a href="https://github.com/GoogleContainerTools/base-images-docker">https://github.com/GoogleContainerTools/base-images-docker</a>