Docker-在Windows环境变量上设置目录路径

Docker-在Windows环境变量上设置目录路径,windows,docker,path,Windows,Docker,Path,我有一个.env文件,其中包含一些环境变量。其中之一是指每个用户为使系统正常工作而必须指定的目录路径。当我在Linux主机上试用时,它工作得非常好,但现在在Windows10系统上试用时,我遇到了一些问题 在Linux中,ENV如下所示: DATA_DIRECTORY_PATH=/home/user/absolute/path/to/folder/data/ ERROR: for orchestrator Cannot start service orchestrator: b'OCI ru

我有一个
.env
文件,其中包含一些环境变量。其中之一是指每个用户为使系统正常工作而必须指定的目录路径。当我在Linux主机上试用时,它工作得非常好,但现在在Windows10系统上试用时,我遇到了一些问题

在Linux中,ENV如下所示:

DATA_DIRECTORY_PATH=/home/user/absolute/path/to/folder/data/
ERROR: for orchestrator  Cannot start service orchestrator: b'OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \\"rootfs_linux.go:58: mounting \\\\\\"/etc/localtime\\\\\\" to rootfs \\\\\\"/var/lib/docker/overlay2/3e21d16a9b19cf553cebccab2454327590e8024abe3643c5577f04f168660488/merged\\\\\\" at \\\\\\"/var/lib/docker/overlay2/3e21d16a9b19cf553cebccab2454327590e8024abe3643c5577f04f168660488/merged/usr/share/zoneinfo/UCT\\\\\\" caused \\\\\\"not a directory\\\\\\"\\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type'
我尝试以相同的方式复制Windows文件夹路径:

DATA_DIRECTORY_PATH=C:\Users\luisc\Luiscri\4Teleco\TFG\TwitterCluster\Proyectos\MABSED\data
但是,此尝试显示错误,并显示装载卷时出现
错误-未找到目录或文件

在谷歌搜索Windows中如何声明路径后,我尝试了以下方法:

DATA_DIRECTORY_PATH=//c/Users/luisc/Luiscri/4Teleco/TFG/TwitterCluster/Proyectos/MABSED/data/
现在错误如下所示:

DATA_DIRECTORY_PATH=/home/user/absolute/path/to/folder/data/
ERROR: for orchestrator  Cannot start service orchestrator: b'OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \\"rootfs_linux.go:58: mounting \\\\\\"/etc/localtime\\\\\\" to rootfs \\\\\\"/var/lib/docker/overlay2/3e21d16a9b19cf553cebccab2454327590e8024abe3643c5577f04f168660488/merged\\\\\\" at \\\\\\"/var/lib/docker/overlay2/3e21d16a9b19cf553cebccab2454327590e8024abe3643c5577f04f168660488/merged/usr/share/zoneinfo/UCT\\\\\\" caused \\\\\\"not a directory\\\\\\"\\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type'
在Windows环境变量中声明路径的正确方法是什么?我来自Linux,我对在Windows上开发非常陌生

为了以防万一,这是我的
docker compose.yml

version: '2'

services:
  dashboard:
    build: demo-dashboard/
    ports:
      - "8080:8080"
    environment:
      - ES_ENDPOINT_EXTERNAL=${ES_ENDPOINT_EXTERNAL}
      - http.cors.enabled=true
      - http.cors.allow-origin=${ES_ENDPOINT_EXTERNAL}
      - http.cors.allow-headers=Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With
      - http.cors.allow-credentials=true
    volumes:
      - ./demo-dashboard:/usr/src/app
    networks:
      - dashboard-network

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.7.0
    environment:
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - http.cors.enabled=true
      - http.cors.allow-origin=http://localhost:8080
      - http.cors.allow-headers=Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With
      - http.cors.allow-credentials=true
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    mem_limit: 1g
    cap_add:
      - IPC_LOCK
    volumes:
      - esdata1:/usr/share/elasticsearch/data/
    networks:
      - dashboard-network
    ports:
      - 9200:9200

  orchestrator:
    image: orchestrator-mabsed
    build: orchestrator/
    environment:
      ES_HOST: 'elasticsearch'
    tty: true
    volumes:
      - socialdata1:/usr/src/data/
      - "/etc/localtime:/etc/localtime:ro"
    networks:
      - dashboard-network

  streamer:
    image: streamer-mabsed
    build: streamer/
    tty: true
    volumes:
      - socialdata1:/usr/src/data/

volumes:
  esdata1:
    driver: local

  socialdata1:
    driver: local
    driver_opts:
      type: none
      device: ${DATA_DIRECTORY_PATH}
      o: bind

networks:
  dashboard-network:
    driver: bridge