关于window 环境下docker-compose的问题
docker214 阅读0 评论
关于window 环境下docker-compose的问题
pywintypes.error: (2, 'WaitNamedPipe', ...
报错命令:docker-compose up -d
错误信息:
pywintypes.error: (2, 'WaitNamedPipe', 'xcfxb5xcdxb3xd5xd2xb2xbbxb5xbdxd6xb8xb6xa8xb5xc4xcexc4xbcxfexa1xa3')
Failed to execute script docker-compose
window环境下docker engine是跑在virtualbox虚拟机的linux系统里的,管理基本上靠docker-machine。所以在window执行docker-xxx的命令基本上都是通过网络连接到virtualbox的虚机上操作docker。
解决方法
- 查看具体环境信息通过
docker-machine env查看,如下
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="C:UsersTheGeniesis.dockermachinemachinesdefault"
export DOCKER_MACHINE_NAME="default"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
# Run this command to configure your shell:
# eval $("C:Program FilesDocker Toolboxdocker-machine.exe" env)
- 在终端执行
docker-compose xxx命令前,先执行eval $("C:Program FilesDocker Toolboxdocker-machine.exe" env)
具体路径以docker-machine env 为准
SSL error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION...
报错命令:docker-compose up -d
错误信息:
SSL error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661)
解决方法
执行 export COMPOSE_TLS_VERSION=TLSv1_2
You might be seeing this error because you're using the wrong Compose file version...
报错命令:docker-compose up -d
错误信息:
You might be seeing this error because you’re using the wrong Compose file version. Either specify a supported version (e.g “2.2” or “3.3”) and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.
原因:
docker-compose.yml 里面的version对应的版本不对
解决方法
docker-compose.yml版本要求看下面对应表,写入正确的对应版本version即可
| Compose file format | Docker Engine release |
|---|---|
| 3.8 | 19.03.0+ |
| 3.7 | 18.06.0+ |
| 3.6 | 18.02.0+ |
| 3.5 | 17.12.0+ |
| 3.4 | 17.09.0+ |
| 3.3 | 17.06.0+ |
| 3.2 | 17.04.0+ |
| 3.1 | 1.13.1+ |
| 3.0 | 1.13.0+ |
| 2.4 | 17.12.0+ |
| 2.3 | 17.06.0+ |
| 2.2 | 1.13.0+ |
| 2.1 | 1.12.0+ |
| 2.0 | 1.10.0+ |
| 1.0 | 1.9.1.+ |
相关文章
评论 (0)
- 还没有评论,来第一条吧。