chef-provisioning-docker
chef-provisioning-docker copied to clipboard
Container.create missing cmd parameter?
I tried to run a simple test, but it fails because Container.create is missing the cmd parameter.
This did not work: container = Docker::Container.create('Image' => image.id, 'name' => container_name)
This works: container = Docker::Container.create('Cmd' => :command, 'Image' => image.id, 'name' => container_name)
Get same issue with CentOS docker images, which supplied without default command:
Docker::Error::ServerError: No command specified
Can you guys please put some default command there (like /bin/bash)?
I get Docker::Error::ServerError -------------------------- No command specified as well.
If I edit line 200 of /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-provisioning-docker-0.5.2/lib/chef/provisioning/docker_driver/driver.rb to change container = Docker::Container.create('Image' => image.id, 'name' => container_name) to container = Docker::Container.create('Image' => image.id, 'name' => container_name, 'Cmd' => docker_options[:command])
then it works.