首页 > 解决方案 > 无法在 Windows 容器上挂载文件

问题描述

当我尝试在 docker-compose.yml 文件上安装配置文件时:

version: '3.4'
services: 
    myService:
    ...
    volumes:
        - c:\DOCKER_DATA\myService.config:c:\MyService.exe.config

我得到:

无法为服务 myService 创建容器:无效的卷规范:'c:\DOCKER_DATA\myService.config:c:\myService.exe.config:rw':“bind”类型的装载配置无效:源路径必须是目录

标签: dockerdocker-composedocker-containerwindows-container

解决方案


目前,此处发布的 Windows 容器不支持此功能。


推荐阅读