Sha256: 0e5f050256da6e24dca50b2a9b606144969c94089f8353c78b0bbab84b456a28

Contents?: true

Size: 1.37 KB

Versions: 2

Compression:

Stored size: 1.37 KB

Contents

# service
include_recipe 'docker_test::default'

# container A
directory '/alice' do
  action :create
end

file '/alice/Dockerfile' do
  content <<-EOF
  FROM alpine
  MAINTAINER alice@computers.biz
  COPY file /
  EOF
  action :create
end

file '/alice/file' do
  content 'alice was here\n'
  action :create
end

docker_image 'alice/bits' do
  source '/alice'
  tag 'latest'
  force true
  subscribes :build, 'file[/alice/Dockerfile]'
  subscribes :build, 'file[/alice/file]'
  action :build_if_missing
end

docker_container 'alice' do
  repo 'alice/bits'
  command 'nc -ll -p 777 -e /bin/cat'
  action :run
  subscribes :redeploy, 'docker_image[alice/bits]'
end

# container B
directory '/bob' do
  action :create
end

file '/bob/Dockerfile' do
  content <<-EOF
  FROM alpine
  MAINTAINER bob@computers.biz
  COPY file /
  EOF
  action :create
end

file '/bob/file' do
  content 'bob was here\n'
  action :create
end

docker_image 'bob/bits' do
  source '/bob'
  tag 'latest'
  force true
  subscribes :build, 'file[/bob/Dockerfile]'
  subscribes :build, 'file[/bob/file]'
  action :build_if_missing
end

docker_container 'bob' do
  repo 'bob/bits'
  links 'alice:alice'
  command 'nc -ll -p 888 -e /bin/cat'
  action :run
  subscribes :redeploy, 'docker_image[bob/bits]'
  subscribes :redeploy, 'docker_container[alice]'
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chef-12.8.1 acceptance/top-cookbooks/test_run/docker/test/cookbooks/docker_test/recipes/notifications.rb
chef-12.8.1-universal-mingw32 acceptance/top-cookbooks/test_run/docker/test/cookbooks/docker_test/recipes/notifications.rb