适用于Docker容器的Azure Runbook [英] Azure runbook for docker container

查看:114
本文介绍了适用于Docker容器的Azure Runbook的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编写用于将docker映像推送到acr的azure Runbook.当我运行脚本时,出现错误docker无法识别为内部或外部命令.

writing azure runbook for pushing docker image to acr. When i am running script i am getting error docker is not recognized as internal or external command.

简化后的运行手册,如下所示.

Simplified runbook as below.

Import-Module hosts
Import-Module docker
Invoke-dockercommand -v
docker -v

当我在nunbook上运行时,我遇到了以下错误.

When i run above nunbook i am getting below error.

Docker.exe : The term 'Docker.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.At C:\Modules\User\Docker\Docker.psm1:41 char:5

任何建议.

感谢Advacne

推荐答案

Azure Automation不支持构建docker映像,因此runbook worker上没有docker.您可以使用混合工作程序(因此您自己的代理程序)并在这些工作程序上安装docker.

Azure Automation doesnt support building docker images, so there is no docker on the runbook workers. You can use hybrid workers (so your own agents) and install docker on those.

还有其他(可能更好的方法)执行此操作.像Azure容器注册表构建任务或CI \ CD管道一样.

There are other (possibly better ways) of doing this. Like Azure Container Registry build tasks or CI\CD pipelines.

这篇关于适用于Docker容器的Azure Runbook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆