Skip to content

Data Persistence with Named Volumes in Docker-Compose

Now that you know how to mount a directory into the container, its time to go one step further. Directory mounting is good for a variety of things, but data that looks different on a variety of platforms (Windows/Linux) is not good.

For example: Windows uses lowercase filenames. MySQL tables rely on filenames for their tables. On Windows you can only have lowercase MySQL tables.

With volume mounting you get a different kind of mounting, which is what we're looking into in this lecture: