MySQL problem solved by using tags

All in this post: MySQL’s latest version 8 is causing trouble / why you should generally consider Docker image tags / and how to deploy directly from your docker-compose.yml to sloppy.io!

MySQL 8 not supported by some Docker images

MySQL has released its new version 8 earlier this spring and while it’s now generally regarded as safer and more efficient, it’s still relatively new and not all software products that work with MySQL have adapted to it, yet. In fact, many sloppy.io users have reported issues with MySQL and their frontend services, like Drupal.

It might be faster, but MySQL 8 is not widely supported, yet.

Use an earlier version by tag

To make MySQL work with these apps again, you have to use an earlier version of the image, in case of MySQL this would be for example version 5.7.20. In order to use this version, you have to use the tag system of Docker images. When choosing an image, like

image: 'mysql'

Docker will always assume that you’re meaning the latest version by default. Instead, use your preferred version as a tag, like

image: 'mysql:5.7.20'

We would always recommend using tags and not the ‘latest’ tag by default, as they make your setup more reliable and independent from version change. By using tags you keep control over your images, so you decide when to switch to a new version and when not.

Setting a tag for a Docker image with the sloppy.io Web UI.

Sample docker-compose.yml for MySQL 5.7.20

Here’s a quick setup for MySQL, using the tag for version 5.7.20 in a docker-compose.yml that you can test on your own system:

version: '3'
services:
	mysql:
		image: 'mysql:5.7.20'
		restart: always
		environment:
			MYSQL_ROOT_PASSWORD: yourverysecurepassword

If you want to deploy this and other docker-compose.yml files directly to sloppy.io you can now do so with our latest CLI update. Use

sloppy start docker-compose.yml

and watch your app being staged and ready in seconds.

In the past, you could only do so with a description in either JSON and YAML and we would still recommend those, since there are some restrictions that you can look up in our Knowledge Base. However, for simple solutions such as this, a docker-compose.yml will do just fine.