Tag: 厨师

如何使用厨师食谱logindocker中心(私人registry)?

我在配方中使用docker_registry用户名和密码,但是我无法成功连接。 码: docker_registry 'https://hub.docker.com/' do username 'XXXXXX' password 'XXXXXX' end

VBoxManage(LockMachine):由厨师创build的Docker机器

我想为厨师创buildDocker的默认机器。 我正在使用命令: docker-machine create –driver=virtualbox –virtualbox-host-dns-resolver=true default 我的问题是,当我在厨师(与execute资源,但我也尝试了batch和powershell_script )内运行它(它运行完全正常(机器被添加到Docker内部),但它不工作在VBox(机器不甚创build)。 docker-machine ls -t 20 NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS default – virtualbox Stopped Unknown docker-machine start Starting "default"… (default) Check network to re-create if needed… Error setting up host only network on machine start: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe modifyvm default –nic2 hostonly –nictype2 8240EM –nicpromisc2 […]

厨师不启动docker集装箱

我在local模式下使用chef-client来安装docker-ce并运行aws-ecs-agent-container Docker守护进程已成功安装并正在作为containerd运行。 当我尝试启动ecs代理容器时,我在日志中获得以下内容 # docker logs -f `docker ps -qa` 2017-07-19T16:18:38Z [INFO] Starting Agent: Amazon ECS Agent – v1.14.3 (15de319) 2017-07-19T16:18:38Z [INFO] Loading configuration 2017-07-19T16:18:38Z [ERROR] Unable to connect to docker daemon. Ensure docker is running. module="TaskEngine" err="Get http://unix.sock/v1.17/version: dial unix /var/run/docker.sock: connect: no such file or directory" 2017-07-19T16:18:38Z [CRITICAL] Error creating Docker client: Get […]

Docker Application Container Engine的依赖失败

我的docker没有开始。 也是抛出低于错误。 这个问题在RHEL服务器中。 请帮我解决这个问题。 Aug 01 00:24:07 rhelserver006 systemd[45452]: Failed to chown socket at step GROUP: No such process Aug 01 00:24:07 rhelserver006 systemd[1]: docker.socket control process exited, code=exited status=216 Aug 01 00:24:07 rhelserver006 systemd[1]: Failed to listen on Docker Socket for the API. — Subject: Unit docker.socket has failed — Defined-By: systemd — Support: […]

运行berks安装时出错

我有一个Windows实例,最重要的是我正在运行一个Windowsdocker集装箱。 在实例本身,我成功地执行berks vendor/install没有任何问题。 但是,在该机器上运行的Windows泊坞窗容器不起作用,并引发超时错误。 错误是不够清楚,所以我决定执行librarian-chef install并获得更多的输出。 看来有一些与SSL连接有关的东西。 在过去几天的长时间的研究之后,我尝试了几件事,但仍然有同样的错误。 Resolving cookbook dependencies… Fetching 'firefox' from source at . Fetching 'firefox_test' from source at test/fixtures/cookbooks/firefox_test Fetching cookbook index from https://supermarket.chef.io… [2017-08-02T09:09:19+00:00] ERROR: Timeout connecting to https://supermarket.chef.io/universe, retry 1/5 [2017-08-02T09:14:24+00:00] ERROR: Timeout connecting to https://supermarket.chef.io/universe, retry 2/5 [2017-08-02T09:19:29+00:00] ERROR: Timeout connecting to https://supermarket.chef.io/universe, retry 3/5 [2017-08-02T09:24:34+00:00] ERROR: Timeout […]

Docker厨师手册设备属性问题

我有一个问题在docker_container资源中设置设备属性 这里是失败厨师客户端运行: https : //gist.github.com/som3guy/e6918e549b7de952846d617c4eb4c347 错误是: json: cannot unmarshal string into Go value of type container.DeviceMapping 我可以删除设备属性,错误消失,但我的容器没有正确configuration在这一点上。 我在这里打开了一个问题: https : //github.com/chef-cookbooks/docker/issues/920

木偶和docker

我正在通过Puppet并将其与Docker进行比较。 我开始知道Puppet是用于可扩展基础架构的configurationpipe理。 新的虚拟机的设置可以用相同的configuration轻松完成 似乎Docker也可以以不同的方式处理所有这些。 docker工人取代木偶,厨师等configurationpipe理工具吗? 请帮我理解。 提前致谢。

无法在Test Kitchen中使用intermediate_instructions和pid_one_commandconfiguration我的Docker容器

以下.kitchen.yml文件无法使用intermediate_instructions中提到的所需工具configuration我的泊坞窗容器。 pid_one_command也不能工作,因为容器仍然使用bash shell加载 任何想法文件有什么问题? driver: name: docker socket: tcp://localhost:2375 binary: docker.exe chef_version: latest privileged: true provisioner: name: chef_zero # You may wish to disable always updating cookbooks in CI or other testing environments. # For example: # always_update_cookbooks: <%= !ENV['CI'] %> always_update_cookbooks: true verifier: name: inspec platforms: – name: ubuntu-16.04 driver: image: ubuntu:16.04 pid_one_command: /bin/systemd […]

延迟厨师,直到资源完成其任务

我有一个厨师的食谱,带来了一个MySQLdocker容器,然后,如果通过一些逻辑,连接到它加载一些数据库条目。 问题是,它总是首先运行失败,因为在mysql容器启动并准备好接受连接之前,它会继续负责恢复数据的资源。 下面是容器的配方部分: docker_container 'imhere-mysql' do hostname mysqlHost repo 'lutraman/imhere' tag 'mysql' env ["MYSQL_ROOT_PASSWORD=#{mysql_password}"] volumes [ '/var/imhere/mysql:/var/lib/mysql' ] action :run end 这是恢复的部分: remote_file "#{parent_data_dir}/#{db_restore_filename}" do source "#{db_restore_url}/#{db_restore_filename}" notifies :run, 'execute[mysql_load_dump]' end execute "mysql_load_dump" do command "#{scripts_dir}/mysql_restore_dump.sh" environment( 'MYSQL_HOSTNAME' => mysqlHost, 'PARENT_DATA_DIR' => parent_data_dir, 'DB_RESTORE_FILENAME' => db_restore_filename, 'MYSQL_PASSWORD' => mysql_password, 'RETRIES' => "10" ) action :nothing […]

运行runit cookbook时,packer docker build退出代码137

我正在尝试使用Packer来构build我正在使用的webapp的docker镜像。 每当我运行runit packer build ,当它到达它运行runit配方的步骤,我会得到Build 'docker' errored: Error executing Chef: Non-zero exit status: 137 我看了看137,发现这是通常与kill -9关联的退出码。 在大多数情况下,这意味着系统在内存上运行严重不足,系统正在尝试进行补偿。 我试图find最小的可能的复制,我想出了这个打包机configuration: { "builders":[{ "type": "docker", "pull": false, "image": "silkstart/basic_server", "export_path": "image.tar", "run_command":[ "-d", "-i", "-t", "–memory-reservation", "1G", "{{.Image}}", "/bin/bash" ] }], "provisioners":[ { "type": "chef-solo", "cookbook_paths": ["cookbooks", "vendor/cookbooks"], "data_bags_path": "data_bags", "roles_path": "roles", "environments_path": "environments", "run_list": [ "recipe[runit]" ] […]