【发布时间】:2021-11-14 04:10:51
【问题描述】:
我已经安装了 Azure 自托管代理 (Linux),并且正在关注来自 https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops 的文档。
我已成功安装代理,但是当我运行 Docker Build 任务编译和构建 docker 映像时,我收到错误 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
在谷歌搜索问题后,似乎下面的代码应该挂载 docker.sock,我应该能够成功构建和推送 docker 映像,但这在 AKS 上不起作用
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-volume
volumes:
- name: docker-volume
hostPath:
path: /var/run/docker.sock
有没有人遇到过这样的问题?我正在使用 AzureDevops Docker@2 任务构建,并且代理正在 AKS 1.19.11 上运行
【问题讨论】:
标签: azure azure-devops azure-pipelines azure-aks azure-pipelines-build-task