Having Docker access External files

后端 未结 3 560
南方客
南方客 2020-12-03 18:05

I am interested in having Docker have access to external files, but I do not wish to include them as a volume. The files that I need access to will change over time, and th

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-03 18:47

    I solved the same problem with below commands

    docker run  --mount type=bind,source="$(pwd)"/data,target=/home/data -it 
    

    Note "-it conainter_name" should be the last flags.

提交回复
热议问题