Permalink
Browse files

Adding init script that fixes the 203 container limit.

  • Loading branch information...
darron committed Jan 26, 2014
1 parent 77309c6 commit 3038d964e0afc63745b925f64586c641dee707ea
Showing with 30 additions and 1 deletion.
  1. +1 −1 metadata.rb
  2. +7 −0 recipes/default.rb
  3. +4 −0 spec/default_spec.rb
  4. +18 −0 templates/default/init.erb
View
@@ -4,7 +4,7 @@
maintainer_email 'darron@froese.org'
license 'Apache 2.0'
description 'Installs/configures docker'
version '0.2.0'
version '0.3.0'
recipe 'docker::default', 'Installs/configures docker'
depends 'apt'
View
@@ -39,6 +39,13 @@
group 'root'
end
template '/etc/init/docker.conf' do
source 'init.erb'
mode 0644
owner 'root'
group 'root'
end
service 'docker' do
provider Chef::Provider::Service::Upstart
action [:start]
View
@@ -13,6 +13,10 @@
expect(chef_run).to create_template('/etc/default/docker')
end
it 'creates the docker init file' do
expect(chef_run).to create_template('/etc/init/docker.conf')
end
it 'enables the docker service' do
expect(chef_run).to enable_service('docker')
end
View
@@ -0,0 +1,18 @@
description "Docker daemon"
start on filesystem and started lxc-net
stop on runlevel [!2345]
# set max file descriptors to 65536 (soft/hard)
limit nofile 65536 65536
respawn
script
DOCKER=/usr/bin/$UPSTART_JOB
DOCKER_OPTS=
if [ -f /etc/default/$UPSTART_JOB ]; then
. /etc/default/$UPSTART_JOB
fi
"$DOCKER" -d $DOCKER_OPTS
end script

0 comments on commit 3038d96

Please sign in to comment.