Updating docker from old version

I am on ubuntu with docker version installed 12.3 running containers with volumes on the host
This version is quite old.
Any recommendations on how to update to the latest version

Upgrading is outlined in Docker provided documents: https://docs.docker.com/engine/installation/linux/ubuntu/

Wasnt sure if that would work as I was going from an old version.
Anyway I followed it and it works