touch: cannot touch 'Dockerfile': Permission denied

2.3k Views Asked by At

I am using the latest version of docker toolbox on windows 10 home and I am getting this problem everytime I run this command I get this error

$ touch Dockerfile                                                                                                      touch: cannot touch 'Dockerfile': Permission denied

I have been running it in docker quickstart terminal but I've also tried running the it in command prompt and also in command prompt in admistartor mode the error I get there is 'touch' is not recognized as an internal or external command, operable program or batch file.

3

There are 3 best solutions below

0
Carson On

Touch isn't a command in CMD.

fsutil file createnew {filename}  {requiredSize}

Will perform a similar function if you're looking to create an empty file.

0
Danny On

Download Git bash or mingw, and coreutils such as touch andtee will work fine inside them.

0
alex0Manz On

it seems that docker toolbox is deprecated now, try to create an instance of wsl subsystem and run docker