There error is that you forgot to add the dot after 'build'
You need to type in the command like this :
$ sudo docker build . -t < name >
The dot basically tells docker that the dockerfile that has to be used is in the current directory.
If you wish to specify a dockerfile that is not located in the local/current directory you can do so in docker v 1.5 like so :
$ sudo docker build --file="" -t < name >
Here --file specifies Name of the Dockerfile where the Default is ‘PATH/Dockerfile’.
Try typing in the commands when you refer tutorials and instructions, you will get less such errors and more practice.
Hope that helped :)
Docker can be tough to learn by self, if you wish to be taught by professionals refer to Docker training course.