If you get this error when you try to build a docker image, it means that you are trying to create a linux image from a windows docker engine. For this, you right click on the ‘Docker’ icon in your task bar and go to settings.
Choose the ‘Docker Engine’. The experimental is by default false. Change it to true and click ‘Apply and Restart’. That’s it.