- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在构建一个本地 docker 镜像,我想标记它,但我不知道 repository
如何应该为我刚刚在本地构建的 docker 图像填写字段。
甚至可以使用 docker_image
标记本地镜像模块?
最佳答案
似乎 docker_image
有更好的解决方案:
tasks:
- name: build_image
docker_image:
name: test_img:latest # Name of image, may be with repo path.
path: .
state: present
register: image_build
- name: tag_version
docker_image:
name: test_img:latest # Equal to name in build task.
repository: test_img:1.2 # New tag there.
pull: no
state: present
when: image_build.changed
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
test_img 1.2 ab14e8cce7ef 9 seconds ago 142MB
test_img latest ab14e8cce7ef 9 seconds ago 142MB
关于image - 如何使用 ansible docker_image 模块标记本地 docker 镜像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38169244/
我在 nexus 中有我的 docker 图像。当我尝试运行该剧本时出现错误 剧本代码 --- - hosts: localhost become: True tasks: - nam
我正在尝试使用 Ansible 的 在机器上构建一堆 docker。 docker_image 模块。 我构建了 1 个“基础”docker 镜像,它在所有后续 docker 镜像中用作 FROM 镜
我正在构建一个本地 docker 镜像,我想标记它,但我不知道 repository 如何应该为我刚刚在本地构建的 docker 图像填写字段。 甚至可以使用 docker_image 标记本地镜像模
我想制作一个简单的脚本,它可以使用 Ansible 从 docker hub 部署和下载 docker 镜像,但是当我尝试执行我的代码时,我遇到了一些错误,如下所示: PLAY [manage doc
在 ansible playbook 中,我正在尝试提取图像并重新标记它: docker pull hyperledger/fabric-ccenv:amd64-1.4.4 docker tag hy
我是一名优秀的程序员,十分优秀!