1

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.

  • Need a little bit more detail. Are you running the touch command from Windows Command Prompt? If so, maybe try running the command prompt as an administrator. – Swagga Ting Jul 30 '20 at 15:29
  • I am using it in docker quikstart terminal but I've also tried it in Windows command prompt in adminstrator and non-adminstrator mode and the error I get in cmd is ('touch' is not recognized as an internal or external command, operable program or batch file.) – SOURABH DHANUKA Jul 30 '20 at 16:59
  • There's no equivalent command for touch in cmd. – Parth Shah Jul 30 '20 at 18:51

3 Answers3

1

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.

Carson
  • 864
  • 1
  • 6
  • 19
1

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

alex0Manz
  • 11
  • 1
0

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

Danny
  • 528
  • 1
  • 4
  • 27