Help! The TLS connection was non-properly terminated

Hi,

I need some help on docker installation.
I just installed a fresh Ubuntu 16.04 server and I am now ready to install docker on it.
I’m following the “Get Docker CE for Ubuntu” (Ubuntu | Docker Docs) instructions. But when I get to the “Install using the repository” section and I try to install the GPG key with the following command:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg
I get the following answer:
curl: (35) gnutls_handshake() failed: The TLS connection was non-properly terminated.

What am I missing? I really don’t understand.

Thanks
Stefan