Docker Community Forums

Share and learn in the Docker community.

Suggestion for naming conventions

I have just build a docker image, that supports multiple versions of PHP, MySQL and other tools.
My question is, what’s the smartest way to tag these for easy use with the different versions, I was thinking of something like: ubuntu20.04-php8.0-mysql8.0, ubuntu20.04-php8.0-mysql5.7 and ubuntu20.04-php7.8-mysql5.7.

My concern is, that I later wish to have more versions along with more services like Apache/nginx/redis and so on, and I would prefer not ending up with a tag like: ubuntu20.04-php8.0-mysql8.0-apache2.4-redis6.2-composer2.0…

Any suggestions of alternative ways to be able to select which services and versions wanted, which then reflects to a tag for my docker image?

Instead of addressing the naming convention part, I will address seperation of concerns :slight_smile:

May I suggest to seperate components, based of whether they are able to run on their own, into their own images? This would reduce the necessity to chain “product” names and the matrix of monolithic all in one images to build and additionaly provide better maintainability.

1 Like