V
V
Valery2017-05-18 23:47:32
Windows
Valery, 2017-05-18 23:47:32

Why doesn't Docker mount a folder outside the home directory?

I'm getting started with Docker. I'm playing, so to speak.
I'm studying how volumes work and I can't mount a folder outside the "documents" directory in any way.
WIndows 7 Ultimate, user Akuma.
Specifying volumes from C:\Users\Akuma and below - works
Specifying any other directory above or from another disk - does not work.
Docker itself does not swear at all. If you go to Kitematic and install from there, it will write that you need to select a folder to which you have read / write permission.
I have already changed the rights to folders and what I just did not mount and that's it.
Tell me what docker- compose.yml
in D:\PhpStrom\docker-app

version: '2'
services:
  nginx:
    image: nginx
    volumes:
      - ./html:/usr/share/nginx/html
    ports:
      - 9000:80

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Valery, 2017-05-19
@Akuma

Here's the answer: Why doesn't docker map directories on Windows 7?
Indirect truth, but still.
To solve the problems, you need to go to VirtualBox and add a mount of the project folder to the virtual machine. Not too obvious, but later it is clear how it works. If you have Windows - suffer :)

C
chupasaurus, 2017-05-19
@chupasaurus

Drive C:\ as well as C:\Users\ does not give write permissions without privileged mode , if you have UAC enabled - put up with it. I dug, blocks not only UAC, changing rights will not help (because the owner is NTAuth/SYSTEM, and changing it is a bit risky).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question