How to use --volume option with Docker Toolbox on Windows?

后端 未结 9 2353
北荒
北荒 2020-12-12 17:19

How can I share a folder between my Windows files and a docker container, by mounting a volume with simple --volume command using Docker Toolbox on?

I\'

9条回答
  •  鱼传尺愫
    2020-12-12 17:36

    Try this:

    1. Open Docker Quickstart Terminal. If it is already open, run $ cd ~ to make sure you are in Windows user directory.
    2. $ docker run -it -v /$(pwd)/ubuntu:/windows ubuntu

    It will work if the error is due to typo. You will get an empty folder named ubuntu in your user directory. You will see this folder with the name windows in your ubuntu container.

提交回复
热议问题