I face the same issue. I am using docker version:17.09.0-ce
.
I follow below steps:
$ sudo docker build -t ubuntu-test:latest .
It resolved issue and image created successsfully.
Note: build command depend on docker version as well as which build option we are using. :)