Skip to content

Instantly share code, notes, and snippets.

@michaeldelorenzo
Created January 14, 2015 16:15
Show Gist options
  • Save michaeldelorenzo/bc0bebc96839d4e68043 to your computer and use it in GitHub Desktop.
Save michaeldelorenzo/bc0bebc96839d4e68043 to your computer and use it in GitHub Desktop.
cookbook 'docker', '~> 0.36.0'
%w(a b c).each do |et|
docker_image "org/image_#{et}" do
tag 'latest'
end
10.times do |x|
docker_container "img_#{et}" do
image "org/image_#{et}"
tag 'latest'
container_name "image_#{et}_#{x.to_s.rjust(2, '0')}"
detach true
hostname "img-#{et.slice(0,3)}-#{x}"
restart 'on-failure'
# env 'DEBUG=true'
action :run
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment