6

I have a docker file that copies a file tree to the container using the command in the docker file:

COPY image /

Docker copies all the files BUT the .sh and .py etc files in the source folder ( on windows ) have execute permission turned on. When the container is run the copies present in the container DO NOT have execute permission turned on?

How do I deal with this other than explicitly chmod +x the files in the docker file when building the container (having to maintain a list of them etc) in this situation.

Kevin Kopf
  • 13,327
  • 14
  • 49
  • 66
peterk
  • 5,136
  • 6
  • 33
  • 47
  • Does this help - https://stackoverflow.com/questions/4249878/how-do-i-change-file-permission-to-a-certain-file-pattern-to-sub-folders-of-my-c ? – gravetii Oct 08 '18 at 06:45
  • @gravetii not really I know about chmod the issue is it is a large file tree with files of many suffi and some files with no suffix ( executable scripts and other unix binaries ) so unless I want to hit all the files including those that should *NOT* be executable it doesn't really help. – peterk Oct 08 '18 at 23:10
  • Maybe you should post it on the docker forums too. – gravetii Oct 09 '18 at 01:04
  • @gravetii one you suggest ? – peterk Oct 09 '18 at 13:23

0 Answers0