windows 2016 容器管理
1. docker-compose 安装
python 2.7
pip
pip install docker-compose
常见问题:
![](https://images2015.cnblogs.com/blog/562987/201703/562987-20170310223235326-1390284835.png)
解决方法:
pip install pypiwin32
2. docker-compose.yaml
docker-compose.yaml 文件如下:
version: '2.1'
services:
db:
image: microsoft/mssql-server-windows-developer
environment:
sa_password: "Password1"
ACCEPT_EULA: "Y"
ports:
- "1433:1433" # REMARK: This is currently required, needs investigation
healthcheck:
test: [ "CMD", "sqlcmd", "-U", "sa", "-P", "Password1", "-Q", "select 1" ]
interval: 1s
retries: 20
web:
build:
context: .
dockerfile: Dockerfile.windows
environment:
- "Data:DefaultConnection:ConnectionString=Server=db,1433;Database=MusicStore;User Id=sa;Password=Password1;MultipleActiveResultSets=True"
depends_on:
db:
condition: service_healthy
ports:
- "5000:5000"
networks:
default:
external:
name: nat
参考地址: