1

I have a situation where I have to copy a single file into docker image.

when I am using :

COPY ./folder_source /folder_destination

its copying all its contents from folder_source to folder_destination. Till this point I am okay to handle file movement. But I am not able to find a way to copy a single file to docker image.

COPY ./setup_server.sh /folder_destination

seems like COPY always expects a folder as a source. Is there any way out to that problem?

psaha4
  • 339
  • 3
  • 17
  • possible duplicate of [How to use Docker's COPY/ADD instructions to copy a single file to an image](http://stackoverflow.com/questions/31640660/how-to-use-dockers-copy-add-instructions-to-copy-a-single-file-to-an-image) – jwodder Jul 29 '15 at 17:22

1 Answers1

2

When you COPY into a directory it must end with a /. For further information please refer to the official documentation.

Henrik Sachse
  • 51,228
  • 7
  • 46
  • 59