Learning docker is hard when all the examples just work but doing something that should be simple doesn't!

The above error is usually caused by people not specifying the working location in the docker build command, often by missing the full-stop (period) in an example command:

docker build -f dockerfile .

Then you get the error that as well as the switches, there should be exactly one argument.

However, you also get the error if you did something like this:

docker build -f dockerfile --isolation .

Why? Because isolation should be in the form of isolation=hyperv or whatever and the missing = sign confuses the build process so instead of a nice error like "You forgot the value of isolation, you idiot", you instead get the error above!

Check your command and check that the example you have copied is correct.