Oh, I see the problem: you are using the snap package of docker.
I always considered the snap version as broken, as it does not behave like vanilla docker. Furthermore, the snap version and versions from distribution repositories are not supported in this forum.
I highly recommend removing the snap package and install docker-ce, the vanilla docker distribution, from Docker’s repositories: https://docs.docker.com/engine/install/ubuntu/.