How to hold back a package from upgrading on Ubuntu 17.10

I'm currently running a docker swarm cluster on a series of ubuntu 17.10 virtual machines and I like to keep them updated regularly but I don't want to update the docker-ce package unless I explicitly am ready to do so. The way I'm managing this currently is by holding back the docker-ce package from being included in the available updates by running:

sudo apt-mark hold docker-ce

This way I can install the available upgrades without having to worry about inadvertently updating docker on one of the nodes in the swarm.

When you are ready to perform the upgrade of the docker-ce package you can remove the hold by running:

sudo apt-mark unhold docker-ce

You can then perform the upgrade to the latest version and place the hold back on it again until next time.