Docker Community Forums

Share and learn in the Docker community.

How to add licensing to a docker image

I have built a custom docker image that solves a specific problem, now I want to put it out in a marketplace with a trial license for 14 days and a custom quote post that. The marketplace that I want to enlist doesn’t have this feature inbuilt, so was wondering if this is something that can be done on the image itself. Has anyone done this before? Any best practices or reading materials that one can share?

As long as the software in the image doesn’t have some kind of licensing system, there (fortunately) is no way of monetizing your image. (I assume that’s what you want). You could not upload the image to an official registry and only share it with people who bought a license but thats janky and will lead to nobody even finding your image.
You can’t do anything to the image to prevent a user from using it. Whatever you do to the image or install in it, I can build a new image on top of your image and remove these restrictions so I can do whatever I want with the new image.

Maybe consider removing the trial and make the image open source and freely available to everyone. Docker is an open source project running on linux, for which linus torwalds doesn’t charge you a penny, your image probably uses a free base image, which is maintained for free and chances are high that your image or your base image also uses free open source software for which the developers don’t get a penny either.

If your image isn’t completely industry breaking like docker was when it was released, everyone is better off when your make your image open source.