我有一个jenkins maven工作,并试图建立一个码头图像。 当我使用此命令构建映像时:
docker build ./docker/ -t containers.test.com/78/tools我收到此错误:
docker:“build”需要1个参数。 请参阅'docker build --help'
我已经重新检查并检查了这个命令几十次。 我甚至试过直接在终端上运行它。 它适用于终端,但不适用于詹金斯。 有什么我想念的吗?
我使用的是Docker 1.12.6版
I have a jenkins maven job and trying to build a docker image. When I build the image with this command:
docker build ./docker/ -t containers.test.com/78/toolsI get this error:
docker: "build" requires 1 argument. See 'docker build --help'
I have rechecked and checked this command dozens of times. I've even tried running it directly in the terminal. It works in the terminal but not in jenkins. Is there something I am missing?
I am using Docker version 1.12.6
最满意答案
通常是
docker build -t foo/bar .^行末尾的点(。)指定用作Docker上下文的当前路径。 试试cd到docker文件夹?
Normally it is
docker build -t foo/bar .^ the dot (.) at the end of the line designates current path to use as Docker context. Try a cd to docker folder?
更多推荐
发布评论