如何在Jenkins Build Execute Shell中运行docker命令 [英] How to run a docker command in Jenkins Build Execute Shell
问题描述
我是詹金斯的新人,我一直在寻找,但找不到我想要的东西。
I'm new to Jenkins and I have been searching around but I couldn't find what I was looking for.
我想知道如何在Jenkins(Build - Execute Shell)中运行docker命令:
I'd like to know how to run docker command in Jenkins (Build - Execute Shell):
示例: docker运行hello-world
我在Jenkins配置系统中设置了Docker安装从portser.io安装最新,并且还安装了几个Docker插件。但是,它仍然没有起作用。
I have set Docker Installation for "Install latest from docker.io" in Jenkins Configure System and also have installed several Docker plugins. However, it still didn't work.
任何人都可以帮我指出我还应该检查还是设置什么?
Can anyone help me point out what else should I check or set?
John
推荐答案
以下插件之一应该可以正常工作:
One of the following plugins should work fine:
- CloudBees Docker Custom Build Environment Plugin
- CloudBees Docker Pipeline Plugin
我通常运行我的构建在预先安装了Docker的从节点上。
I normally run my builds on slave nodes that have docker pre-installed.
这篇关于如何在Jenkins Build Execute Shell中运行docker命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!