首页 > 解决方案 > 在 vs2017-win2016 托管代理上使用 SQL Server docker 容器

问题描述

我正在尝试使用 Azure Pipelines 为pymssqlWindows 和 Linux 创建更简化的 CI 流程。Linux 版本能够成功下载并启动 DockerMSSQL映像以进行集成测试,但是当我尝试为 Windows 执行相同操作时,即使超时 45 分钟,映像也无法成功下载。有人MSSQL在 MS Windows 托管代理上成功启动了 Docker 容器吗?

https://dev.azure.com/alexander-hagerman/pymssql/_build/results?buildId=48

azure-pipelines.yaml

jobs:

- job: Windows
  timeoutInMinutes: 45
  pool:
    vmImage: 'vs2017-win2016'
  strategy:
    matrix:
      Python37:
        python.version: '3.7'

  steps:
  - task: UsePythonVersion@0
    displayName: 'Use Python $(python.version)'
    inputs:
      versionSpec: '$(python.version)'

  - script: docker run -d -p 1433:1433 -e sa_password=YourStrong@Passw0rd -e ACCEPT_EULA=Y microsoft/mssql-server-windows-developer:latest
    displayName: 'Start SQL Server container service'

  - script: cp tests/tests.cfg.tpl tests/tests.cfg
    displayName: "Create config file from template for test connections."

  - script: pip install tox cython
    displayName: 'Install initial dependencies'

  - script: tox -e py
    displayName: 'Run Tox'

标签: sql-serverazuredockerazure-devops

解决方案


推荐阅读