我们都知道git的tag功能是为了将代码的某个状态打上一个戳,通过tag我们可以很轻易的找到对应的提交。
", "echo \"${var.docker_image} is run\" > example.txt", ] } post-processor "docker-tag" { learn-packer" tags = ["ubuntu-xenial"] only = ["docker.ubuntu"] } post-processor "docker-tag learn-packer.docker.ubuntu-bionic (docker-tag): Repository: docker.io/backendcloud/learn-packer:ubuntu-bionic finished after 11 seconds 861 milliseconds.==> learn-packer.docker.ubuntu: Running post-processor: (type docker-tag learn-packer.docker.ubuntu (docker-tag): Repository: docker.io/backendcloud/learn-packer:ubuntu-xenial
: queue: test - wait - name: "Push docker image" command: "shared_ci_script/bin/docker-tag env: DEPLOYMENT_ENV: production agents: queue: production 在上述配置中,command中的步骤(即:test、docker-tag
docker-search(1) 在Docker index中搜索一个image docker-start(1) 启动一个容器 docker-stop(1) 终止一个运行中的容器 docker-tag
并在其中运行给定命令 docker save # 保存一个镜像为tar包文件 docker-search # 在Docker index中搜索一个镜像 docker-start # 启动一个容器 docker-tag