Docker on Centos7 host underwhelms

So one of the things I've been working on recently is creating a docker-based container to host a complex application for video processing that requires a lot of OS-level setup. I, of course, work on a number of Ubuntu 17.04 machines for development, and docker there has proven to be exactly what you expect. You create a Dockerfile, and if it works here, it works there, no muss, no fuss. It does what it says on the box. Honestly it's been a pleasure to work with.

Then I went to run the containers on Centos7 hosts.

Note that this is about 90% of the value proposition of Docker, portable containers you can ship to a different host.

For those who haven't done this the default Centos7 install is an XFS filesystem. Yay for progress and all that. Oh, and the default on Centos7 for docker is to use overlayfs which is compatible with XFS, except it's only compatible with XFS if you happened to setup the non-default ftype=1 flag when creating the filesystem, but it doesn't check for that flag. Queue up much gnashing of teeth as the docker build process becomes a wonderful world of pain and suffering with RPM db corruptions, random failures to delete directories, and generally ridiculously non-predictable behaviour.

But, you say, overlayfs + XFS ftype=0 is an unsupported configuration. True, I might answer, but dang it, it's the default install of the tool on a default install of the OS. At the very least, refuse to run if you're on a configuration which is just going to fall over and die in exotic and hard-to-debug ways. Make the default the slow-as-dirt loopback fs if you are running against XFS with the wrong ftype, better that things run slow than you violate the entire *point* of the framework. We use docker to have a stable, reliable way to replicate work across environments, if that's not possible, error out and report the failure, or choose a reliable-but-slow alternative.

Apparently the solution is to have a separate set of block devices that you use for docker, and because that's a royal PITA to configure the default is to do silly things. Sigh.



Pingbacks are closed.

Post your comment