As far as I know, I can sell to one of my clients a PHP web service that connects to a MySQL server that I host without making my PHP sources open source. This is because the PHP code only connects to the MySQL server. Please correct me if I am wrong.

Ok, nowadays, we have docker and I could package my PHP sources together with an official MySQL community edition image via docker-compose (one PHP service, one official MySQL CE image). My client could now host these containers on his own internal servers. Is this still ok, or would I now have to get a commercial license because I am "deploying" a docker-compose file?

Edit: I have stumbled over this post, where one answer goes in the direction that distributing MySQL is an issue. However, they tell that migrating to PostgresSQL is an option. For me, this would be no problem. What do you think?

  • I am not familiar with docker, but if I get your combined package would it be possible to replace the MySQL image with a home-built version of MySQL? Does docker-compose create a new, single, executable out of the images or is it merely a means of ensuring that the deployed system matches what you tested with in terms of installed packages and versions? – Bart van Ingen Schenau Mar 1 at 7:27
  • If you have access to the docker system, you could replace the mysql service by another home-built mysql service. docker-compose creates one image for each service, so one mysql image (not altered by me in any way). In the process of executing docker-compose the official mysql binary package is only downloaded and configured to be ready to run. So, yes, I would say it is a means to ensure the system matches my requirements. – Olli D-Metz Mar 1 at 10:37
  • 1
    In that case, the combined package is an aggregate/collection of independent works. The collection and the parts are not considered to be derived works of each other, which means that you are completely free in your choice of license for the PHP application. – Bart van Ingen Schenau Mar 1 at 12:05
  • Thanks! I would like to upvote your comment, but I can't :-/ – Olli D-Metz Mar 2 at 16:26
up vote 2 down vote accepted

As a docker-compose.yml file is a set of instructions for installing container images, but does not contain the software binaries itself, you have no specific license constraints around how you distribute that docker-compose.yml file (assuming you wrote it from scratch).

Now, it is possible that your client would not be compliant with the MySQL Community Edition license once he has run docker-compose and installed it. That would be up to the terms of that license. Since MySQL CE is still distributed under the GPLv2, this would only affect your client if they then decided to redistribute their software, with the database or its drivers embedded. This depends partly on their choice of database driver: mysqlnd has a more flexible license.

PostgreSQL is distributed under The PostgreSQL License, a "liberal" license which is functionally identical to the MIT license, and thus almost entirely unrestricted in how you distribute it (you have to keep a copy of the license, that's pretty much it).

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.