问题标签 [ansible-container]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
803 浏览

docker - 在 ansible 容器构建期间未定义 GLIBC_PRIVATE 面临的问题

代码:container.yml

使用的命令:sudo ansible-container --debug build

请检查并帮助解决重定位错误的步骤

0 投票
1 回答
283 浏览

authentication - 构建 nginx 容器时面临身份验证和权限问题

代码:
版本:'2' 设置:conductor_base:centos:7 服务:ansible.play_container:来自:“nginx_base”角色:

使用的命令: Sudo ansible-container --debug build

请帮助解决权限错误

0 投票
0 回答
250 浏览

docker - Nginx 容器没有启动

我使用 sudo docker run -it imageid /bin/sh 进入图像内部并尝试启动 nginx 容器。在下面找到用于启动 nginx 的脚本:

入口点.sh:

在我的图像中检查 nginx 状态的命令:nginx -t 命令。

nginx : 配置文件 /opv/nginx-18/nginx/nginx.conf 语法没问题 nginx : 配置文件 /opv/nginx-18/nginx/nginx.conf 测试成功 请告诉我如何用它启动 nginx命令。

0 投票
1 回答
1177 浏览

docker - 在没有 docker 注册表的情况下使用 ansible-container 部署 docker 映像

我正在尝试使用 ansible-container 来创建和部署我的 docker 应用程序,但我无法让它工作。

我有一个可以通过 ansible 配置的远程服务器。在我的本地机器上,我正在使用 ansible-container 构建一个运行良好的 docker 映像。运行后ansible-container build,我的本地机器上有 docker 映像。但是,我没有下一步工作。我的目标是将 docker 镜像从我的本地机器推送到远程服务器,然后在远程服务器上基于该镜像创建并启动一个 docker 容器。

我没有使用 docker 注册表。因此,我使用了命令--local-images选项来ansible-container deploy阻止它将图像推送到注册表(至少这是我从文档中了解到的)。这个命令成功地创建了一个 ansible playbook,但是当我执行这个 playbook 时,它仍然尝试从 docker.io 注册表中提取图像,当然在那里找不到它。

我认为缺少的步骤是将本地 docker 映像推送到远程服务器,但我在 ansible-container 文档中找不到此用例的任何提示。我还查看了ansible docker_image 模块,但据我了解,这也以使用注册表为中心。

如何使用 ansible 将 docker 映像部署到远程服务器?

0 投票
1 回答
415 浏览

docker - ansible-container 没有挂载我的卷

我有两个简单的服务:adminer 和 mysql。

容器.yml:

但是,在构建并运行之后,创建的容器上没有 /var/dump.sql 文件,并且当我使用 --debug 模式运行它时也没有错误。此外,我没有在 container.yml 文件中定义一个新卷,但不知何故创建了它:

它是如何工作的?它怎么知道 mysql 数据应该在卷上?为什么它看不到我自己的卷?

如果我在 docker-compose 上运行相同的服务,一切都很好。

版本:

  • Ansible 容器,版本 0.9.2。
  • Docker 版本 17.09.1-ce。

我将不胜感激任何帮助。谢谢。

0 投票
0 回答
88 浏览

python - 使用 Ansible-Container 构建创建 nginx 容器时遇到 /usr/bin/python 上的模块错误

代码:
Container.yml:
版本:'2' 设置:导体:基础:centos:7 服务:ansible.nginx-container:来自:“nginx:base”角色:- nginx_container 端口:-“80:3000” 用户:root命令:[nginx,-g,'daemon off'] 注册表:{} OS/Environment:
Ansible Container,版本 0.9.2 Linux,3.10.0-327.13.1.el7.x86_64,#1 SMP Mon Feb 29
[GCC 4.8.5 20150623(红帽 4.8.5-14)] /usr/bin/python

0 投票
0 回答
221 浏览

python - 使用 docker-machine 构建 ansible-container 在证书问题上失败

我正在使用 docker-machine 默认 EC2 驱动程序来创建我的 docker 主机: docker-machine start aws-sandbox 它已经启动了。现在尝试将 ansible-container 与默认示例一起使用

构建失败:

我需要“喂”这些设置吗?

如何设置 ansible 以在此处正确读取构建阶段的证书?

0 投票
1 回答
9701 浏览

docker - ansible-container docker.errors.DockerException:获取服务器 API 版本时出错

我正在尝试在我的 Mac 上使用 ansible-container 模块构建一个容器并遇到以下问题。

组件的内部版本号如下:

我的 Mac 上的 Docker 已安装并运行良好。

任何帮助表示赞赏!

0 投票
2 回答
626 浏览

python - ansible-container 不是 JSON 可序列化的

我们刚刚开始从 ansible-container 0.9.2 获取 container.yml “不是 JSON 可序列化” - 这是我们已经运行了几个月并且没有发生错误的版本。任何想法为什么这可能刚刚开始?

我们的堆栈跟踪是

这是我们的python环境的样子:

这是我们 container.yml 的一个例子

0 投票
1 回答
235 浏览

docker - Ansible-container push/deploy failure; cant push images to dockerhub

I am trying to push an image built with ansible-container to my registry in Dockerhub.I have pushed to this same image to the same registry using just docker so I am pretty sure it has nothing to do with my local version of docker or with Dockerhub.

The command I run to push the image is:

ansible-container push --username zacharius --password $PASS --push-to https://hub.docker.com/

and I get a timeout message:

container.exceptions.AnsibleContainerConductorException: Error logging into registry: 500 Server Error: Internal Server Error ("Get https://hub.docker.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")

I have been pulling my hair out trying to get ansible-container and Dockerhub to talk to each other and any assistance would be greatly appreciated