Skip to content

Instantly share code, notes, and snippets.

@fnichol
Created October 27, 2015 23:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fnichol/b4a42630ad08df08d51e to your computer and use it in GitHub Desktop.
Save fnichol/b4a42630ad08df08d51e to your computer and use it in GitHub Desktop.

Docker Cookbook In Chef-Apply? It's easy!

export CHEF_DOCKER_PATH=/path/to/docker/cookbook
chef-apply docka.rb
Dir.glob(File.join(File.expand_path(ENV.fetch("CHEF_DOCKER_PATH", Dir.pwd)), "libraries", "**/*")).sort.each { |lib| require lib }
docker_image "busybox" do
action :pull
end
docker_container "an_echo_server" do
repo "busybox"
port "1234:1234"
command "nc -ll -p 1234 -e /bin/cat"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment