我觀察下面的錯誤,而我下面執行命令錯誤響應:集裝箱f88566c370dd沒有運行
CMD used- docker exec -it f88566c370dd /bin/bash
錯誤遵循 - Error response from daemon: Container f88566c370dd is not running
我什麼doing-試圖從執行廚師食譜虛擬機拉圖像和朗姆酒三個Centos容器。在虛擬機用來執行廚師配方
廚師配方相關
#
# Cookbook Name:: chef-docker
# Recipe:: default #
# Copyright 2016, SONATA_SOFTWARE #
# All rights reserved - Do Not Redistribute
#
docker_service 'default' do
action [:create, :start]
end
# Pull latest image
docker_image 'centos' do
tag 'latest'
action :pull
end
# Run container
docker_container 'first' do
repo 'centos'
command 'ls -la /'
end
docker_container 'second' do
repo 'centos'
command 'ls -la /'
end
docker_container 'third' do
repo 'centos'
command 'ls -la /'
end
命令
chef-client -r recipe[chef-docker::Default]
預期結果:軟件,如Java,Python或工具,如詹金斯,在tomcat安裝容器
[[email protected] ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos latest 97cad5e16cb6 3 weeks ago 196.5 MB
[[email protected] ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f88566c370dd centos:latest "ls -la /" 18 hours ago Exited (0) 17 hours ago third
fdc12e9f65a9 centos:latest "ls -la /" 18 hours ago Exited (0) 17 hours ago second
604f0eba7010 centos:latest "ls -la /" 18 hours ago Exited (0) 17 hours ago first
未創建碼頭容器。你能用你正在運行的腳本的輸出更新問題嗎? docker ps -a列出你的容器嗎? – user2599522
@ user2599522-更新了問題。 – Kally
狀態:已退出,你當然無法連接 – YOU