我正在尝试使用 Jenkins docker 插件在我的 Jenkins 管道中推广 docker 映像,但我能够这样做,因为我遇到了以下错误。
"docker tag" requires exactly 2 arguments.
See 'docker tag --help'.
Usage: docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
我可以在日志中看到以下内容
docker tag artifactory.mycompany.com/docker-dev/appname/dev:latest artifactory.mycompany.com/docker-dev/appname/dev:artifactory.mycompany.com/docker-dev/appname/dev:latest artifactory.mycompany.com/docker-dev/appname/test:latest
管道代码:
testImage = docker.image("artifactory.mycompany.com/docker-dev/appname/dev:latest")
testImage.pull()
testImage.push("artifactory.mycompany.com/docker-dev/appname/dev:latest artifactory.mycompany.com/docker-dev/appname/test:latest" )
知道这里有什么问题...
编辑#1:如果我遵循我会得到不同的错误。
testImage = docker.image("artifactory.mycompany.com/docker-dev/appname/dev:latest")
testImage.pull()
testImage.tag("artifactory.mycompany.com/docker-dev/appname/test:latest")
testImage.push( )
错误:
Error parsing reference: "artifactory.mycompany.com/docker-dev/appnamee/dev:artifactory.mycompany.com/docker-dev/appname/test:latest" is not a valid repository/tag: invalid reference format