TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How do you handle LICENSE notices in published Docker images?

12 pointsby mrmattyboy12 months ago
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:&#x2F;&#x2F;github.com&#x2F;MatthewJohn&#x2F;terrareg&#x2F;blob&#x2F;main&#x2F;LICENSE.third-party)<p>* Use pip-licenses to generate per-package license files for each of the installed pip packages (https:&#x2F;&#x2F;github.com&#x2F;MatthewJohn&#x2F;terrareg&#x2F;blob&#x2F;main&#x2F;Dockerfile#L77)<p>* Copied all &#x27;doc&#x27; license files from deb packages to common directory (https:&#x2F;&#x2F;github.com&#x2F;MatthewJohn&#x2F;terrareg&#x2F;blob&#x2F;main&#x2F;Dockerfile#L80C1-L80C173)<p>* Manually copy licenses for tooling that is installed in the Docker build (https:&#x2F;&#x2F;github.com&#x2F;MatthewJohn&#x2F;terrareg&#x2F;blob&#x2F;main&#x2F;Dockerfile#L82)<p>I&#x27;m wondering if anyone else has tackled this and&#x2F;or seen it done anywhere else?<p>How have others implemented anything similar?<p>Thanks! :)

1 comment

shanewilhelm12 months ago
I&#x27;m not entirely sure, but here&#x27;s an example of how Google does it: <a href="https:&#x2F;&#x2F;github.com&#x2F;GoogleContainerTools&#x2F;base-images-docker">https:&#x2F;&#x2F;github.com&#x2F;GoogleContainerTools&#x2F;base-images-docker</a>
评论 #40473896 未加载