Errno::ENOMEM: Cannot allocate memory

see: Install Docker Engine on Ubuntu | Docker Docs

you want docker-engine, lxc-docker should be removed.