Custom build for docker engine

I have an OS that is based on Centos6.5, but running kernel 3.10.0-327 from Centos.
I need to run docker engine on this x86_64 machine.
I was able to run the static build of docker, but it could not work with device mapper storage driver, only with vfs driver.
I’d appreciate any pointers on how to build docker engine with dynamic linking, but without dependencies on systemd and fit to run on centos6.5 with kernel 3.10.0-327