I try to perform the following command in Ubuntu 14.04:
systemctl enable --now docker-cleanup-dangling-images.timer
I also tried it with sudo,
I just encountered this problem myself and found that Ubuntu 14.04 uses Upstart instead of Systemd, so systemctl commands will not work. This changed in 15.04, so one way around this would be to update your ubuntu install.
If this is not an option for you (it's not for me right now), you need to find the Upstart command that does what you need to do.
For enable, the generic looks to be the following:
update-rc.d
Link to Ubuntu documentation: https://wiki.ubuntu.com/SystemdForUpstartUsers