One of the advantages snap package manager brings to Ubuntu is support for multiple versions of same software available and installable simultaneously. For example, you can decide if you want to run the stable or latest (edge) version of Docker.
Before You Install Docker with Snap
Apparently, snap model is not fully compatible with Docker right now, this means starting and using docker that you installed via snap is not as simple as you might expect.
Specifically, Docker is no longer maintaining the Docker version so it's built and supported by Canonical (Ubuntu vendor).
The way I see it: if you just need a hassle free Docker setup, install Docker using apt-get from the official Docker repositories.
Confirm Docker Versions Available via Snap
Running snap info docker will list all the available channels for Docker in snap:
greys@xps:~ $ snap info docker name: docker summary: Docker container runtime publisher: Canonical✓ contact: email@example.com license: Apache-2.0 description: | Build and run container images with Docker. This build requires all files that Docker uses, such as dockerfiles, to be in $HOME. Keep files there for 'docker build', 'docker save' and 'docker load'. Use the 'docker-privilege' command for 'docker run --privileged'. This snap is built by Canonical based on source code published by Docker, Inc. It is not endorsed or published by Docker, Inc. Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries. Docker, Inc. and other parties may also have trademark rights in other terms used herein. snap-id: sLCsFAO8PKM5Z0fAKNszUOX0YASjQfeZ channels: stable: 18.06.1-ce 2019-05-08 (384) 102MB - candidate: 18.06.1-ce 2019-06-04 (392) 102MB - beta: 18.06.1-ce 2019-05-31 (392) 102MB - edge: 18.09.7-ce 2019-07-09 (404) 127MB - 17.09/stable: – 17.09/candidate: 17.09.1-ce 2017-12-22 (232) 44MB - 17.09/beta: 17.09.1-ce 2017-12-20 (232) 44MB - 17.09/edge: 17.09.1-ce 2017-12-14 (232) 44MB - 17.06/stable: 17.06.2-ce 2017-12-22 (179) 43MB - 17.06/candidate: 17.06.2-ce 2017-10-10 (179) 43MB - 17.06/beta: ↑ 17.06/edge: 17.06.2-ce-1 2018-01-03 (237) 44MB - 17.03/stable: 17.03.2-ce-1 2017-07-20 (159) 42MB - 17.03/candidate: 17.03.2-ce-1 2017-06-30 (159) 42MB - 17.03/beta: ↑ 17.03/edge: 17.03.2-ce-1 2017-06-30 (159) 42MB - Install Latest (Edge) Version of Docker with Snap
Based on the above, let's install the latest Docker package version available via edge channel:
greys@xps:~ $ sudo snap install docker --edge [sudo] password for greys: Download snap "docker" (404) from channel "edge" 98% 316kB/s 9.50s docker (edge) 18.09.7-ce from Canonical✓ installed
Check the Version of Docker We Just Installed
greys@xps:~ $ docker --version Docker version 18.09.7-ce, build 3a74934