Home  >  Q&A  >  body text

docker-compose中volumes的问题

mysite.template是一个文件,但是映射到docker里就成了一个目录,请问是哪里写错了呢?

大家讲道理大家讲道理2707 days ago591

reply all(3)I'll reply

  • 天蓬老师

    天蓬老师2017-04-25 09:03:42

    The official explanation of Volume is Data directory, the connection is as follows:

     https://docs.docker.com/engine/tutorials/dockervolumes/
    

    If you are simply adding files, you can use add or copy

    reply
    0
  • 高洛峰

    高洛峰2017-04-25 09:03:42

    -v host_path/mysite.template:ps_path/mysite.template

    The run syntax is written like this. Pay attention to the file name

    reply
    0
  • 黄舟

    黄舟2017-04-25 09:03:42

    The same file can be put into ubuntu and it will work. I guess there is something wrong with the docker in windows

    reply
    0
  • Cancelreply