├── .gitignore ├── .rspec ├── Gemfile ├── Guardfile ├── LICENSE.txt ├── MIT-LICENSE ├── README.md ├── Rakefile ├── docker.gemspec ├── lib ├── docker.rb └── docker │ ├── api.rb │ ├── connection.rb │ ├── error.rb │ ├── error │ ├── bad_parameter_error.rb │ ├── container_not_found.rb │ ├── image_not_found.rb │ ├── internal_server_error.rb │ └── not_found_error.rb │ ├── resource.rb │ ├── resource │ ├── base.rb │ ├── container.rb │ └── image.rb │ └── version.rb └── spec ├── cassettes ├── Docker_Connection │ ├── returns_a_stream.yml │ ├── returns_a_valid_response_for_a_basic_request.yml │ ├── returns_a_valid_response_for_get_request.yml │ ├── returns_a_valid_response_for_post_request.yml │ ├── returns_status_404_for_non_existent_path.yml │ ├── sets_given_query_parameters.yml │ └── sets_given_request_headers.yml ├── Docker_Resource_Container │ ├── attach │ │ └── raises_an_exception_for_an_unknown_container.yml │ ├── changes │ │ └── inspects_the_container_s_filesystem_changes.yml │ ├── commit │ │ ├── creates_a_new_image_from_the_container_s_changes.yml │ │ └── raises_an_exception_for_an_unknown_container.yml │ ├── create │ │ ├── raises_an_exception_when_called_with_invalid_options.yml │ │ ├── with_many_settings.yml │ │ └── with_minimal_settings.yml │ ├── kill │ │ ├── raises_an_exception_for_an_unknow_container.yml │ │ └── the_container.yml │ ├── lists │ │ ├── all_running_containers.yml │ │ ├── limit_last_created_containers.yml │ │ ├── non-running_processes_too.yml │ │ ├── processes_before_a_certain_created_container.yml │ │ └── processes_since_a_certain_created_container.yml │ ├── logs │ │ ├── raises_an_exception_for_an_unknown_container.yml │ │ ├── returns_the_stderr_of_a_container.yml │ │ └── returns_the_stdout_of_a_container.yml │ ├── remove │ │ ├── deletes_the_container.yml │ │ └── raises_an_exception_with_an_invalid_container.yml │ ├── restarts │ │ ├── raises_an_exception_for_an_unknown_container.yml │ │ └── the_container.yml │ ├── shows │ │ ├── raises_an_exception_for_an_unknown_container.yml │ │ └── the_low_level_details.yml │ ├── start │ │ ├── brings_a_container_into_state_running.yml │ │ └── raises_an_exception_for_an_unknown_container.yml │ ├── stop │ │ ├── halts_a_container.yml │ │ └── raises_an_exception_for_an_unknown_container.yml │ └── wait │ │ ├── blocks_until_the_container_stops.yml │ │ └── raises_an_exception_for_an_unknown_container.yml ├── Docker_Resource_Image │ ├── history │ │ ├── .yml │ │ ├── size │ │ │ └── .yml │ │ └── step │ │ │ └── .yml │ ├── list │ │ ├── .yml │ │ ├── includes_latest_base_image.yml │ │ └── size │ │ │ └── .yml │ ├── remove │ │ ├── deletes_the_image.yml │ │ └── raises_an_exception_for_an_unknown_image.yml │ ├── show │ │ ├── .yml │ │ └── raises_an_exception_for_an_unknown_image.yml │ └── tag │ │ ├── an_image_into_a_repository.yml │ │ └── raises_an_exception_for_an_unknown_image.yml └── test_setup │ ├── commit_container.yml │ ├── create_container__command_ │ └── bin │ │ └── sh_-c_while_true_do_echo_hello_world_sleep_1_done_.yml │ ├── create_container_connection_post.yml │ ├── create_container_container_attach.yml │ ├── create_container_container_changes.yml │ ├── create_container_container_commit.yml │ ├── create_container_container_kill.yml │ ├── create_container_container_lists1.yml │ ├── create_container_container_lists2.yml │ ├── create_container_container_logs.yml │ ├── create_container_container_remove.yml │ ├── create_container_container_restarts.yml │ ├── create_container_container_shows.yml │ ├── create_container_container_start.yml │ ├── create_container_container_stop.yml │ ├── create_container_container_wait.yml │ ├── create_container_test-image.yml │ ├── create_container_test-returns-a-stream.yml │ ├── create_container_test-tag.yml │ ├── delete_container.yml │ ├── delete_image.yml │ ├── start_container.yml │ └── wait_on_container.yml ├── docker ├── api_spec.rb ├── connection_spec.rb └── resource │ ├── container_spec.rb │ └── image_spec.rb ├── helpers.rb └── spec_helper.rb /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.rbc 3 | .bundle 4 | .config 5 | .yardoc 6 | .env 7 | Gemfile.lock 8 | InstalledFiles 9 | _yardoc 10 | coverage 11 | doc/ 12 | lib/bundler/man 13 | pkg 14 | rdoc 15 | spec/reports 16 | test/tmp 17 | test/version_tmp 18 | tmp 19 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --format progress 3 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # Specify your gem's dependencies in docker.gemspec 4 | gemspec 5 | -------------------------------------------------------------------------------- /Guardfile: -------------------------------------------------------------------------------- 1 | # A sample Guardfile 2 | # More info at https://github.com/guard/guard#readme 3 | 4 | guard :rspec, :cli => "-t ~live" do 5 | watch(%r{^spec/.+_spec\.rb$}) 6 | watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } 7 | watch('spec/spec_helper.rb') { "spec" } 8 | end 9 | 10 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Georg Kunz 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /MIT-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Georg Kunz. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker Client 2 | 3 | Docker client library to access the Docker remote API. 4 | 5 | ## Installation 6 | 7 | Add this line to your application's Gemfile: 8 | 9 | gem 'docker-client' 10 | 11 | And then execute: 12 | 13 | $ bundle 14 | 15 | Or install it yourself as: 16 | 17 | $ gem install docker-client 18 | 19 | ## Usage 20 | 21 | **Ready to be used with Docker version [0.4.0](http://get.docker.io/builds/Linux/x86_64/docker-latest.tgz).** 22 | 23 | So far only the [containers](http://docs.docker.io/en/latest/api/docker_remote_api.html#containers) resource is supported. The images resource and endpoints in category misc according to the Docker [Remote API documentation](http://docs.docker.io/en/latest/api/docker_remote_api.html) are not yet implemented (wip: see [pull request](https://github.com/geku/docker-client/pull/1)) 24 | 25 | 26 | ````ruby 27 | require 'docker' 28 | require 'awesome_print' 29 | 30 | docker = Docker::API.new(base_url: 'http://localhost:4243') 31 | containers = docker.containers 32 | 33 | # Create a new container 34 | result = containers.create(['/bin/sh', '-c', 'while true; do echo hello world; sleep 1; done'], 'base') 35 | container_id = result["Id"] 36 | ap result 37 | 38 | # Start created container 39 | containers.start(container_id) 40 | 41 | # Get container details (inspect) 42 | details = containers.show(container_id) 43 | ap details 44 | 45 | # Get file system changes of container 46 | changes = containers.changes(container_id) 47 | ap changes 48 | 49 | # Attach to container for 3 seconds 50 | options = {stdout: true, stderr: false} 51 | containers.attach(container_id, options, 3) do |data| 52 | puts ">> #{data}" 53 | end 54 | 55 | # Get all output since container is started 56 | output = containers.logs(container_id) 57 | ap output 58 | 59 | # List all running containers 60 | running_containers = containers.list 61 | ap running_containers 62 | 63 | # Stop container 64 | containers.stop(container_id) 65 | 66 | # Remove container 67 | containers.remove(container_id) 68 | 69 | ```` 70 | 71 | ## Development 72 | 73 | ### Run tests 74 | 75 | All tests are stubbed with VCR. You can edit the setting `config.default_cassette_options` in `spec_helper.rb` to run the tests against the docker API. Set it to `{:record => :all}`. This will alos re-record all VCR request/response. To run the tests stubbed again uncomment the before mentioned setting. 76 | 77 | ## Contributing 78 | 79 | 1. Fork it 80 | 2. Create your feature branch (`git checkout -b my-new-feature`) 81 | 3. Commit your changes (`git commit -am 'Add some feature'`) 82 | 4. Push to the branch (`git push origin my-new-feature`) 83 | 5. Create new Pull Request 84 | 85 | 86 | ## License 87 | 88 | MIT License. Copyright 2013 Georg Kunz. 89 | 90 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require "bundler/gem_tasks" 2 | require 'rspec/core/rake_task' 3 | require 'docker' 4 | 5 | RSpec::Core::RakeTask.new(:spec) do |t| 6 | # Documentation output 7 | # Disable live tests 8 | t.rspec_opts = "-f d -t ~live" 9 | end 10 | 11 | # Only run focus examples 12 | RSpec::Core::RakeTask.new(:focus) do |t| 13 | t.rspec_opts = "-f d -t focus" 14 | end 15 | 16 | task :default => :spec 17 | 18 | namespace :docker do 19 | desc "Stop and delete all Docker containers" 20 | task :cleanup do 21 | container = Docker::API.new(base_url: 'http://10.0.5.5:4243').containers 22 | counter = 0 23 | container.list(all: true).each do |c| 24 | puts "Delete container #{c['Id']}" 25 | container.remove(c['Id']) 26 | counter += 1 27 | end 28 | 29 | puts "Total of #{counter} containers deleted" 30 | 31 | end 32 | end 33 | 34 | -------------------------------------------------------------------------------- /docker.gemspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | lib = File.expand_path('../lib', __FILE__) 3 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 4 | require 'docker/version' 5 | 6 | Gem::Specification.new do |spec| 7 | spec.name = 'docker-client' 8 | spec.version = Docker::VERSION 9 | spec.authors = ['Georg Kunz'] 10 | spec.email = ['kwd@gmx.ch'] 11 | spec.description = %q{Docker client} 12 | spec.summary = %q{Docker client library to access the Docker remote API.} 13 | spec.homepage = 'https://github.com/geku/docker-client' 14 | spec.license = 'MIT' 15 | spec.required_ruby_version = '>= 1.9' 16 | 17 | spec.files = `git ls-files`.split($/) 18 | spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } 19 | spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) 20 | spec.require_paths = ['lib'] 21 | 22 | spec.add_development_dependency 'bundler', '~> 1.3' 23 | spec.add_development_dependency 'rake' 24 | spec.add_development_dependency 'rspec', '~> 2.13' 25 | spec.add_development_dependency 'vcr', '~> 2.5' 26 | spec.add_development_dependency 'webmock', '~> 1.11' 27 | spec.add_development_dependency 'activesupport', '~> 3.2.13' 28 | spec.add_development_dependency 'guard' 29 | spec.add_development_dependency 'guard-rspec' 30 | spec.add_development_dependency 'awesome_print' 31 | 32 | spec.add_runtime_dependency 'multi_json', '~> 1.7' 33 | spec.add_runtime_dependency 'json', '~> 1.7.7' 34 | spec.add_runtime_dependency 'curb', '~> 0.8.4' 35 | 36 | end 37 | -------------------------------------------------------------------------------- /lib/docker.rb: -------------------------------------------------------------------------------- 1 | require 'docker/version' 2 | require 'docker/api' 3 | require 'docker/resource' 4 | require 'docker/error' 5 | 6 | module Docker 7 | # Your code goes here... 8 | end 9 | -------------------------------------------------------------------------------- /lib/docker/api.rb: -------------------------------------------------------------------------------- 1 | require 'docker/connection' 2 | 3 | module Docker 4 | end 5 | 6 | class Docker::API 7 | 8 | attr_reader :connection 9 | 10 | def initialize(options) 11 | @debug = options[:debug] 12 | @ssl = options[:ssl] || { :verify => false } 13 | base_url = options[:base_url] 14 | @connection = Docker::Connection.new(base_url: base_url) 15 | # @faraday_adapter = options[:faraday_adapter] || Faraday.default_adapter 16 | # @faraday = options[:faraday] || default_faraday 17 | end 18 | 19 | def containers 20 | Docker::Resource::Container.new(@connection) 21 | end 22 | 23 | def images 24 | Docker::Resource::Image.new(@connection) 25 | end 26 | 27 | def system 28 | 29 | end 30 | 31 | 32 | end -------------------------------------------------------------------------------- /lib/docker/connection.rb: -------------------------------------------------------------------------------- 1 | require 'curb' 2 | require 'multi_json' 3 | 4 | module Docker 5 | end 6 | 7 | class Docker::Connection 8 | 9 | class Response < Struct.new(:body, :status, :content_type, :timeout) 10 | def body_as_json 11 | MultiJson.load(body) 12 | end 13 | end 14 | 15 | def initialize(options = {}) 16 | @base_url = options[:base_url] 17 | raise(ArgumentError, ':base_url missing') unless @base_url 18 | end 19 | 20 | def get(path, params = {}, headers = {}) 21 | resp = perform_request(:GET, path, params, headers) 22 | raise(Docker::Error::InternalServerError, resp.body) if resp.status == 500 23 | resp 24 | end 25 | 26 | def post(path, params = {}, body = '', headers = {}) 27 | resp = perform_request(:POST, path, params, headers, body) 28 | raise(Docker::Error::InternalServerError, resp.body) if resp.status == 500 29 | resp 30 | end 31 | 32 | def delete(path, params = {}, headers = {}) 33 | resp = perform_request(:DELETE, path, params, headers) 34 | raise(Docker::Error::InternalServerError, resp.body) if resp.status == 500 35 | resp 36 | end 37 | 38 | def stream(path, params = {}, timeout = nil, headers = {}, &block) 39 | raise(ArgumentError, 'Block required to handle streaming response') if block.nil? 40 | 41 | curl = curl_for(path, params, headers) 42 | 43 | begin 44 | timeout_raised = false 45 | curl.timeout = timeout if timeout 46 | curl.on_body {|data| block.call(data); data.size } 47 | curl.http(:POST) 48 | rescue Curl::Err::TimeoutError => e 49 | timeout_raised = true 50 | end 51 | 52 | Response.new(curl.body_str, curl.response_code, curl.content_type, timeout_raised) 53 | end 54 | 55 | 56 | private 57 | 58 | def perform_request(verb, path, query_params = {}, headers = {}, body = nil) 59 | curl = curl_for(path, query_params, headers, body) 60 | 61 | curl.http(verb) 62 | 63 | Response.new(curl.body_str, curl.response_code, curl.content_type) 64 | end 65 | 66 | def curl_for(path, query_params = {}, headers = {}, body = nil) 67 | Curl::Easy.new do |curl| 68 | set_url(curl, path, query_params) 69 | set_headers(curl, headers) 70 | set_body(curl, body) 71 | end 72 | end 73 | 74 | def set_body(curl, body) 75 | curl.post_body = body if body 76 | end 77 | 78 | def set_url(curl, path, query_params) 79 | params = query_params.collect do |key, value| 80 | "#{curl.escape(key)}=#{curl.escape(value)}" 81 | end 82 | param_str = params.empty? ? '' : "?#{params.join('&')}" 83 | curl.url = "#{@base_url}#{path}#{param_str}" 84 | end 85 | 86 | def set_headers(curl, headers) 87 | headers.each do |key, value| 88 | curl.headers[key] = value 89 | end 90 | end 91 | 92 | end 93 | -------------------------------------------------------------------------------- /lib/docker/error.rb: -------------------------------------------------------------------------------- 1 | require 'docker/error/internal_server_error' 2 | require 'docker/error/container_not_found' 3 | require 'docker/error/image_not_found' 4 | require 'docker/error/not_found_error' 5 | require 'docker/error/bad_parameter_error' 6 | 7 | module Docker 8 | module Error 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /lib/docker/error/bad_parameter_error.rb: -------------------------------------------------------------------------------- 1 | module Docker 2 | module Error 3 | end 4 | end 5 | 6 | class Docker::Error::BadParameterError < StandardError 7 | end 8 | -------------------------------------------------------------------------------- /lib/docker/error/container_not_found.rb: -------------------------------------------------------------------------------- 1 | module Docker 2 | module Error 3 | end 4 | end 5 | 6 | class Docker::Error::ContainerNotFound < StandardError 7 | end 8 | -------------------------------------------------------------------------------- /lib/docker/error/image_not_found.rb: -------------------------------------------------------------------------------- 1 | module Docker 2 | module Error 3 | end 4 | end 5 | 6 | class Docker::Error::ImageNotFound < StandardError 7 | end 8 | -------------------------------------------------------------------------------- /lib/docker/error/internal_server_error.rb: -------------------------------------------------------------------------------- 1 | module Docker 2 | module Error 3 | end 4 | end 5 | 6 | class Docker::Error::InternalServerError < StandardError 7 | end 8 | -------------------------------------------------------------------------------- /lib/docker/error/not_found_error.rb: -------------------------------------------------------------------------------- 1 | module Docker 2 | module Error 3 | end 4 | end 5 | 6 | class Docker::Error::NotFoundError < StandardError 7 | end 8 | -------------------------------------------------------------------------------- /lib/docker/resource.rb: -------------------------------------------------------------------------------- 1 | require 'docker/resource/base' 2 | require 'docker/resource/container' 3 | require 'docker/resource/image' 4 | 5 | module Docker 6 | module Resource 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /lib/docker/resource/base.rb: -------------------------------------------------------------------------------- 1 | module Docker 2 | module Resource 3 | end 4 | end 5 | 6 | class Docker::Resource::Base 7 | def initialize(connection) 8 | @connection = connection 9 | end 10 | 11 | private 12 | 13 | # TODO add all methods to gather all HTTP calls in this superclass 14 | # Than it should be easier to replaces it for streaming support 15 | def get 16 | 17 | end 18 | 19 | 20 | 21 | end 22 | 23 | -------------------------------------------------------------------------------- /lib/docker/resource/container.rb: -------------------------------------------------------------------------------- 1 | 2 | module Docker 3 | module Resource 4 | end 5 | end 6 | 7 | class Docker::Resource::Container < Docker::Resource::Base 8 | # TODO set 'Content-Type: application/json' 9 | 10 | # Options 11 | # all 12 | # limit 13 | # since 14 | # before 15 | def list(options = {}) 16 | @connection.get('/containers/ps', options).body_as_json 17 | end 18 | 19 | def create(command, images = ['base'], options = {}) 20 | command = [command] if command.is_a?(String) 21 | body = {'Cmd' => command, 'Images' => images} 22 | body = options.merge(body) 23 | json_body = MultiJson.dump(body) 24 | 25 | response = @connection.post("/containers/create", {}, json_body, {'Content-Type' => 'application/json'}) 26 | raise(Docker::Error::NotFoundError) if response.status == 404 27 | response.body_as_json 28 | end 29 | 30 | # inspect is a Ruby internal method that should not be overwritten 31 | # therefore we use show as it displays the container details 32 | def show(container_id) 33 | response = @connection.get("/containers/#{container_id}/json") 34 | raise_if_container_not_found(response.status) 35 | response.body_as_json 36 | end 37 | 38 | def changes(container_id) 39 | @connection.get("/containers/#{container_id}/changes").body_as_json 40 | end 41 | 42 | # TODO default run configuration not supported yet 43 | def commit(container_id, repository, tag = nil, options = {}) 44 | options[:container] = container_id 45 | options[:repo] = repository 46 | options[:tag] = tag if tag 47 | response = @connection.post("/commit", options) 48 | raise_if_container_not_found(response.status) 49 | response.body_as_json 50 | end 51 | 52 | # Returns a stream 53 | def export 54 | 55 | end 56 | 57 | def start(container_id) 58 | status = @connection.post("/containers/#{container_id}/start").status 59 | raise_if_container_not_found(status) 60 | status == 204 61 | end 62 | 63 | def stop(container_id, timeout = nil) 64 | params = {} 65 | params['t'] = timeout if timeout 66 | status = @connection.post("/containers/#{container_id}/stop", params).status 67 | raise_if_container_not_found(status) 68 | status == 204 69 | end 70 | 71 | def restart(container_id, timeout = nil) 72 | params = {} 73 | params['t'] = timeout if timeout 74 | status = @connection.post("/containers/#{container_id}/restart", params).status 75 | raise_if_container_not_found(status) 76 | status == 204 77 | end 78 | 79 | def kill(container_id) 80 | status = @connection.post("/containers/#{container_id}/kill").status 81 | raise_if_container_not_found(status) 82 | status == 204 83 | end 84 | 85 | # Valid options: 86 | # stdout true default is false 87 | # stderr true default is false 88 | def attach(container_id, options = {}, timeout = nil, &block) 89 | raise(ArgumentError, "Block must be given to handle streamed data") if block.nil? 90 | options = {stdout: true, stderr: true} if options.empty? 91 | options = options.merge(stream: true, logs: false) 92 | 93 | response = @connection.stream("/containers/#{container_id}/attach", options, timeout, {}, &block) 94 | raise_if_container_not_found(response.status) 95 | raise(BadParameterError) if response.status == 400 96 | response 97 | end 98 | 99 | def logs(container_id, options = {}) 100 | options = {stdout: true, stderr: true} if options.empty? 101 | options = options.merge(logs: true, stream: false) 102 | 103 | response = @connection.post("/containers/#{container_id}/attach", options) 104 | raise_if_container_not_found(response.status) 105 | raise(BadParameterError) if response.status == 400 106 | response.body 107 | end 108 | 109 | # Blocks until container exits 110 | def wait(container_id) 111 | response = @connection.post("/containers/#{container_id}/wait") 112 | raise_if_container_not_found(response.status) 113 | response.body_as_json 114 | end 115 | 116 | # Options: 117 | # v remove volumes of container 118 | def remove(container_id, delete_volumes = false) 119 | params = {v: delete_volumes} 120 | status = @connection.delete("/containers/#{container_id}", params).status 121 | raise_if_container_not_found(status) 122 | status == 204 123 | end 124 | 125 | private 126 | 127 | def raise_if_container_not_found(status) 128 | raise(Docker::Error::ContainerNotFound) if status == 404 129 | end 130 | 131 | 132 | end 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /lib/docker/resource/image.rb: -------------------------------------------------------------------------------- 1 | module Docker 2 | module Resource 3 | end 4 | end 5 | 6 | class Docker::Resource::Image < Docker::Resource::Base 7 | 8 | def list(options = {}) 9 | @connection.get('/images/json', options).body_as_json 10 | end 11 | 12 | # Inspect an image 13 | def show(name) 14 | response = @connection.get("/images/#{name}/json") 15 | raise_if_image_not_found(response.status) 16 | response.body_as_json 17 | end 18 | 19 | def history(name) 20 | response = @connection.get("/images/#{name}/history") 21 | raise_if_image_not_found(response.status) 22 | response.body_as_json 23 | end 24 | 25 | 26 | def tag(name, repository, options = {}) 27 | options = options.merge(repo: repository) 28 | status = @connection.post("/images/#{name}/tag", options).status 29 | raise_if_image_not_found(status) 30 | raise(BadParameterError) if status == 400 31 | status == 201 32 | end 33 | 34 | def remove(name) 35 | status = @connection.delete("/images/#{name}").status 36 | raise_if_image_not_found(status) 37 | status == 204 38 | end 39 | 40 | def search(term) 41 | params = {term: term} 42 | @connection.get("/images/search", params).body_as_json 43 | end 44 | 45 | private 46 | 47 | def raise_if_image_not_found(status) 48 | raise(Docker::Error::ImageNotFound) if status == 404 49 | end 50 | 51 | end 52 | 53 | -------------------------------------------------------------------------------- /lib/docker/version.rb: -------------------------------------------------------------------------------- 1 | module Docker 2 | VERSION = "0.1.4" 3 | end 4 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Connection/returns_a_stream.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/ae19ed6ad4f6/attach?stdout=1&stream=1 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 19 | body: 20 | encoding: US-ASCII 21 | string: '' 22 | http_version: 23 | recorded_at: Mon, 03 Jun 2013 21:09:37 GMT 24 | - request: 25 | method: post 26 | uri: http://10.0.5.5:4243/containers/d7c4f0a4d3f7/attach?stdout=1&stream=1 27 | body: 28 | encoding: US-ASCII 29 | string: '' 30 | headers: {} 31 | response: 32 | status: 33 | code: 200 34 | message: !binary |- 35 | T0s= 36 | headers: 37 | !binary "Q29udGVudC1UeXBl": 38 | - !binary |- 39 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 40 | body: 41 | encoding: US-ASCII 42 | string: '' 43 | http_version: 44 | recorded_at: Mon, 03 Jun 2013 21:12:25 GMT 45 | - request: 46 | method: post 47 | uri: http://10.0.5.5:4243/containers/7e0ee7d10b70/attach?stdout=1&stream=1 48 | body: 49 | encoding: US-ASCII 50 | string: '' 51 | headers: {} 52 | response: 53 | status: 54 | code: 200 55 | message: !binary |- 56 | T0s= 57 | headers: 58 | !binary "Q29udGVudC1UeXBl": 59 | - !binary |- 60 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 61 | body: 62 | encoding: US-ASCII 63 | string: '' 64 | http_version: 65 | recorded_at: Mon, 03 Jun 2013 21:14:41 GMT 66 | - request: 67 | method: post 68 | uri: http://10.0.5.5:4243/containers/38329f467a4c/attach?stdout=1&stream=1 69 | body: 70 | encoding: US-ASCII 71 | string: '' 72 | headers: {} 73 | response: 74 | status: 75 | code: 200 76 | message: !binary |- 77 | T0s= 78 | headers: 79 | !binary "Q29udGVudC1UeXBl": 80 | - !binary |- 81 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 82 | body: 83 | encoding: US-ASCII 84 | string: '' 85 | http_version: 86 | recorded_at: Mon, 03 Jun 2013 21:16:33 GMT 87 | - request: 88 | method: post 89 | uri: http://10.0.5.5:4243/containers/b3962d5b8de6/attach?stdout=1&stream=1 90 | body: 91 | encoding: US-ASCII 92 | string: '' 93 | headers: {} 94 | response: 95 | status: 96 | code: 200 97 | message: !binary |- 98 | T0s= 99 | headers: 100 | !binary "Q29udGVudC1UeXBl": 101 | - !binary |- 102 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 103 | body: 104 | encoding: US-ASCII 105 | string: '' 106 | http_version: 107 | recorded_at: Mon, 03 Jun 2013 21:17:13 GMT 108 | - request: 109 | method: post 110 | uri: http://10.0.5.5:4243/containers/2cc41f9cb206/attach?stdout=1&stream=1 111 | body: 112 | encoding: US-ASCII 113 | string: '' 114 | headers: {} 115 | response: 116 | status: 117 | code: 200 118 | message: !binary |- 119 | T0s= 120 | headers: 121 | !binary "Q29udGVudC1UeXBl": 122 | - !binary |- 123 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 124 | body: 125 | encoding: US-ASCII 126 | string: '' 127 | http_version: 128 | recorded_at: Mon, 03 Jun 2013 21:18:48 GMT 129 | - request: 130 | method: post 131 | uri: http://10.0.5.5:4243/containers/4f092237fdba/attach?stdout=1&stream=1 132 | body: 133 | encoding: US-ASCII 134 | string: '' 135 | headers: {} 136 | response: 137 | status: 138 | code: 200 139 | message: !binary |- 140 | T0s= 141 | headers: 142 | !binary "Q29udGVudC1UeXBl": 143 | - !binary |- 144 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 145 | body: 146 | encoding: US-ASCII 147 | string: '' 148 | http_version: 149 | recorded_at: Mon, 03 Jun 2013 21:19:06 GMT 150 | - request: 151 | method: post 152 | uri: http://10.0.5.5:4243/containers/6ce0aa6fb8a6/attach?stdout=1&stream=1 153 | body: 154 | encoding: US-ASCII 155 | string: '' 156 | headers: {} 157 | response: 158 | status: 159 | code: 200 160 | message: !binary |- 161 | T0s= 162 | headers: 163 | !binary "Q29udGVudC1UeXBl": 164 | - !binary |- 165 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 166 | body: 167 | encoding: US-ASCII 168 | string: '' 169 | http_version: 170 | recorded_at: Mon, 03 Jun 2013 21:19:25 GMT 171 | recorded_with: VCR 2.5.0 172 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Connection/returns_a_valid_response_for_a_basic_request.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/containers/ps 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1OCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W10= 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:58 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Connection/returns_a_valid_response_for_get_request.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/containers/ps?all=true 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1MCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W10= 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:50 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Connection/returns_a_valid_response_for_post_request.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/b8439f302512/start 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 204 13 | message: !binary |- 14 | Tm8gQ29udGVudA== 15 | headers: 16 | !binary "RGF0ZQ==": 17 | - !binary |- 18 | U2F0LCAyNSBNYXkgMjAxMyAxNjowNTo0MSBHTVQ= 19 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 20 | - !binary |- 21 | Y2h1bmtlZA== 22 | !binary "Q29udGVudC1UeXBl": 23 | - !binary |- 24 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary "" 28 | http_version: 29 | recorded_at: Sat, 25 May 2013 16:05:43 GMT 30 | - request: 31 | method: post 32 | uri: http://10.0.5.5:4243/containers/6cbae4b13ca9/start 33 | body: 34 | encoding: US-ASCII 35 | string: '' 36 | headers: {} 37 | response: 38 | status: 39 | code: 204 40 | message: !binary |- 41 | Tm8gQ29udGVudA== 42 | headers: 43 | !binary "RGF0ZQ==": 44 | - !binary |- 45 | TW9uLCAwMyBKdW4gMjAxMyAyMDo1OTozNyBHTVQ= 46 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 47 | - !binary |- 48 | Y2h1bmtlZA== 49 | !binary "Q29udGVudC1UeXBl": 50 | - !binary |- 51 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 52 | body: 53 | encoding: ASCII-8BIT 54 | string: !binary "" 55 | http_version: 56 | recorded_at: Mon, 03 Jun 2013 20:59:37 GMT 57 | - request: 58 | method: post 59 | uri: http://10.0.5.5:4243/containers/6aa0bb9dbb7d/start 60 | body: 61 | encoding: US-ASCII 62 | string: '' 63 | headers: {} 64 | response: 65 | status: 66 | code: 204 67 | message: !binary |- 68 | Tm8gQ29udGVudA== 69 | headers: 70 | !binary "RGF0ZQ==": 71 | - !binary |- 72 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDo0MyBHTVQ= 73 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 74 | - !binary |- 75 | Y2h1bmtlZA== 76 | !binary "Q29udGVudC1UeXBl": 77 | - !binary |- 78 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 79 | body: 80 | encoding: ASCII-8BIT 81 | string: !binary "" 82 | http_version: 83 | recorded_at: Mon, 03 Jun 2013 21:04:42 GMT 84 | - request: 85 | method: post 86 | uri: http://10.0.5.5:4243/containers/480462275567/start 87 | body: 88 | encoding: US-ASCII 89 | string: '' 90 | headers: {} 91 | response: 92 | status: 93 | code: 204 94 | message: !binary |- 95 | Tm8gQ29udGVudA== 96 | headers: 97 | !binary "RGF0ZQ==": 98 | - !binary |- 99 | TW9uLCAwMyBKdW4gMjAxMyAyMTowOTozNCBHTVQ= 100 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 101 | - !binary |- 102 | Y2h1bmtlZA== 103 | !binary "Q29udGVudC1UeXBl": 104 | - !binary |- 105 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 106 | body: 107 | encoding: ASCII-8BIT 108 | string: !binary "" 109 | http_version: 110 | recorded_at: Mon, 03 Jun 2013 21:09:34 GMT 111 | - request: 112 | method: post 113 | uri: http://10.0.5.5:4243/containers/f38cf6aade96/start 114 | body: 115 | encoding: US-ASCII 116 | string: '' 117 | headers: {} 118 | response: 119 | status: 120 | code: 204 121 | message: !binary |- 122 | Tm8gQ29udGVudA== 123 | headers: 124 | !binary "RGF0ZQ==": 125 | - !binary |- 126 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMTowNSBHTVQ= 127 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 128 | - !binary |- 129 | Y2h1bmtlZA== 130 | !binary "Q29udGVudC1UeXBl": 131 | - !binary |- 132 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 133 | body: 134 | encoding: ASCII-8BIT 135 | string: !binary "" 136 | http_version: 137 | recorded_at: Mon, 03 Jun 2013 21:21:05 GMT 138 | - request: 139 | method: post 140 | uri: http://10.0.5.5:4243/containers/3dd6e2fd32d4/start 141 | body: 142 | encoding: US-ASCII 143 | string: '' 144 | headers: {} 145 | response: 146 | status: 147 | code: 204 148 | message: !binary |- 149 | Tm8gQ29udGVudA== 150 | headers: 151 | !binary "RGF0ZQ==": 152 | - !binary |- 153 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNToxNyBHTVQ= 154 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 155 | - !binary |- 156 | Y2h1bmtlZA== 157 | !binary "Q29udGVudC1UeXBl": 158 | - !binary |- 159 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 160 | body: 161 | encoding: ASCII-8BIT 162 | string: !binary "" 163 | http_version: 164 | recorded_at: Mon, 03 Jun 2013 21:25:17 GMT 165 | - request: 166 | method: post 167 | uri: http://10.0.5.5:4243/containers/5689e7d5b039/start 168 | body: 169 | encoding: US-ASCII 170 | string: '' 171 | headers: {} 172 | response: 173 | status: 174 | code: 204 175 | message: !binary |- 176 | Tm8gQ29udGVudA== 177 | headers: 178 | !binary "RGF0ZQ==": 179 | - !binary |- 180 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNzozNiBHTVQ= 181 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 182 | - !binary |- 183 | Y2h1bmtlZA== 184 | !binary "Q29udGVudC1UeXBl": 185 | - !binary |- 186 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 187 | body: 188 | encoding: ASCII-8BIT 189 | string: !binary "" 190 | http_version: 191 | recorded_at: Mon, 03 Jun 2013 21:27:36 GMT 192 | - request: 193 | method: post 194 | uri: http://10.0.5.5:4243/containers/cafd7750cd30/start 195 | body: 196 | encoding: US-ASCII 197 | string: '' 198 | headers: {} 199 | response: 200 | status: 201 | code: 204 202 | message: !binary |- 203 | Tm8gQ29udGVudA== 204 | headers: 205 | !binary "RGF0ZQ==": 206 | - !binary |- 207 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1NiBHTVQ= 208 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 209 | - !binary |- 210 | Y2h1bmtlZA== 211 | !binary "Q29udGVudC1UeXBl": 212 | - !binary |- 213 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 214 | body: 215 | encoding: ASCII-8BIT 216 | string: !binary "" 217 | http_version: 218 | recorded_at: Mon, 03 Jun 2013 21:37:56 GMT 219 | recorded_with: VCR 2.5.0 220 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Connection/returns_status_404_for_non_existent_path.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/invalid_path 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1NiBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | NDA0IHBhZ2Ugbm90IGZvdW5kCg== 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:56 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Connection/sets_given_query_parameters.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/pseudo_params?first=argument&second=param 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1NiBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | NDA0IHBhZ2Ugbm90IGZvdW5kCg== 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:56 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Connection/sets_given_request_headers.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/pseudo_request 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 404 15 | message: !binary |- 16 | Tm90IEZvdW5k 17 | headers: 18 | !binary "Q29udGVudC1UeXBl": 19 | - !binary |- 20 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 21 | !binary "RGF0ZQ==": 22 | - !binary |- 23 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1NiBHTVQ= 24 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 25 | - !binary |- 26 | Y2h1bmtlZA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | NDA0IHBhZ2Ugbm90IGZvdW5kCg== 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:37:56 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/attach/raises_an_exception_for_an_unknown_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/invalid_id/attach?logs=false&stderr=true&stdout=true&stream=true 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoyNiBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: US-ASCII 27 | string: '' 28 | http_version: 29 | recorded_at: Mon, 03 Jun 2013 21:37:26 GMT 30 | recorded_with: VCR 2.5.0 31 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/changes/inspects_the_container_s_filesystem_changes.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/containers/8fab97b08092/changes 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | U2F0LCAyNSBNYXkgMjAxMyAxNjowNTozMyBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W3siUGF0aCI6Ii9kZXYiLCJLaW5kIjowfSx7IlBhdGgiOiIvZGV2L2ttc2ci 29 | LCJLaW5kIjoxfSx7IlBhdGgiOiIvdG1wIiwiS2luZCI6MH0seyJQYXRoIjoi 30 | L3RtcC9jaGFuZ2VzIiwiS2luZCI6MX1d 31 | http_version: 32 | recorded_at: Sat, 25 May 2013 16:05:35 GMT 33 | - request: 34 | method: get 35 | uri: http://10.0.5.5:4243/containers/f28f1e3082c0/changes 36 | body: 37 | encoding: US-ASCII 38 | string: '' 39 | headers: {} 40 | response: 41 | status: 42 | code: 200 43 | message: !binary |- 44 | T0s= 45 | headers: 46 | !binary "Q29udGVudC1UeXBl": 47 | - !binary |- 48 | YXBwbGljYXRpb24vanNvbg== 49 | !binary "RGF0ZQ==": 50 | - !binary |- 51 | TW9uLCAwMyBKdW4gMjAxMyAyMTowMDowNiBHTVQ= 52 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 53 | - !binary |- 54 | Y2h1bmtlZA== 55 | body: 56 | encoding: ASCII-8BIT 57 | string: !binary |- 58 | W3siUGF0aCI6Ii9kZXYiLCJLaW5kIjowfSx7IlBhdGgiOiIvZGV2L2ttc2ci 59 | LCJLaW5kIjoxfSx7IlBhdGgiOiIvdG1wIiwiS2luZCI6MH0seyJQYXRoIjoi 60 | L3RtcC9jaGFuZ2VzIiwiS2luZCI6MX1d 61 | http_version: 62 | recorded_at: Mon, 03 Jun 2013 21:00:06 GMT 63 | - request: 64 | method: get 65 | uri: http://10.0.5.5:4243/containers/55d7e2344dd3/changes 66 | body: 67 | encoding: US-ASCII 68 | string: '' 69 | headers: {} 70 | response: 71 | status: 72 | code: 200 73 | message: !binary |- 74 | T0s= 75 | headers: 76 | !binary "Q29udGVudC1UeXBl": 77 | - !binary |- 78 | YXBwbGljYXRpb24vanNvbg== 79 | !binary "RGF0ZQ==": 80 | - !binary |- 81 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDoyMiBHTVQ= 82 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 83 | - !binary |- 84 | Y2h1bmtlZA== 85 | body: 86 | encoding: ASCII-8BIT 87 | string: !binary |- 88 | W3siUGF0aCI6Ii9kZXYiLCJLaW5kIjowfSx7IlBhdGgiOiIvZGV2L2ttc2ci 89 | LCJLaW5kIjoxfSx7IlBhdGgiOiIvdG1wIiwiS2luZCI6MH0seyJQYXRoIjoi 90 | L3RtcC9jaGFuZ2VzIiwiS2luZCI6MX1d 91 | http_version: 92 | recorded_at: Mon, 03 Jun 2013 21:04:22 GMT 93 | - request: 94 | method: get 95 | uri: http://10.0.5.5:4243/containers/249a77b7cd10/changes 96 | body: 97 | encoding: US-ASCII 98 | string: '' 99 | headers: {} 100 | response: 101 | status: 102 | code: 200 103 | message: !binary |- 104 | T0s= 105 | headers: 106 | !binary "Q29udGVudC1UeXBl": 107 | - !binary |- 108 | YXBwbGljYXRpb24vanNvbg== 109 | !binary "RGF0ZQ==": 110 | - !binary |- 111 | TW9uLCAwMyBKdW4gMjAxMyAyMToxMDowNCBHTVQ= 112 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 113 | - !binary |- 114 | Y2h1bmtlZA== 115 | body: 116 | encoding: ASCII-8BIT 117 | string: !binary |- 118 | W3siUGF0aCI6Ii9kZXYiLCJLaW5kIjowfSx7IlBhdGgiOiIvZGV2L2ttc2ci 119 | LCJLaW5kIjoxfSx7IlBhdGgiOiIvdG1wIiwiS2luZCI6MH0seyJQYXRoIjoi 120 | L3RtcC9jaGFuZ2VzIiwiS2luZCI6MX1d 121 | http_version: 122 | recorded_at: Mon, 03 Jun 2013 21:10:04 GMT 123 | - request: 124 | method: get 125 | uri: http://10.0.5.5:4243/containers/4fb29a135ce7/changes 126 | body: 127 | encoding: US-ASCII 128 | string: '' 129 | headers: {} 130 | response: 131 | status: 132 | code: 200 133 | message: !binary |- 134 | T0s= 135 | headers: 136 | !binary "Q29udGVudC1UeXBl": 137 | - !binary |- 138 | YXBwbGljYXRpb24vanNvbg== 139 | !binary "RGF0ZQ==": 140 | - !binary |- 141 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMToxOSBHTVQ= 142 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 143 | - !binary |- 144 | Y2h1bmtlZA== 145 | body: 146 | encoding: ASCII-8BIT 147 | string: !binary |- 148 | W3siUGF0aCI6Ii9kZXYiLCJLaW5kIjowfSx7IlBhdGgiOiIvZGV2L2ttc2ci 149 | LCJLaW5kIjoxfSx7IlBhdGgiOiIvdG1wIiwiS2luZCI6MH0seyJQYXRoIjoi 150 | L3RtcC9jaGFuZ2VzIiwiS2luZCI6MX1d 151 | http_version: 152 | recorded_at: Mon, 03 Jun 2013 21:21:19 GMT 153 | - request: 154 | method: get 155 | uri: http://10.0.5.5:4243/containers/e0a0df374739/changes 156 | body: 157 | encoding: US-ASCII 158 | string: '' 159 | headers: {} 160 | response: 161 | status: 162 | code: 200 163 | message: !binary |- 164 | T0s= 165 | headers: 166 | !binary "Q29udGVudC1UeXBl": 167 | - !binary |- 168 | YXBwbGljYXRpb24vanNvbg== 169 | !binary "RGF0ZQ==": 170 | - !binary |- 171 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNTo0NSBHTVQ= 172 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 173 | - !binary |- 174 | Y2h1bmtlZA== 175 | body: 176 | encoding: ASCII-8BIT 177 | string: !binary |- 178 | W3siUGF0aCI6Ii9kZXYiLCJLaW5kIjowfSx7IlBhdGgiOiIvZGV2L2ttc2ci 179 | LCJLaW5kIjoxfSx7IlBhdGgiOiIvdG1wIiwiS2luZCI6MH0seyJQYXRoIjoi 180 | L3RtcC9jaGFuZ2VzIiwiS2luZCI6MX1d 181 | http_version: 182 | recorded_at: Mon, 03 Jun 2013 21:25:45 GMT 183 | - request: 184 | method: get 185 | uri: http://10.0.5.5:4243/containers/30417829f9d5/changes 186 | body: 187 | encoding: US-ASCII 188 | string: '' 189 | headers: {} 190 | response: 191 | status: 192 | code: 200 193 | message: !binary |- 194 | T0s= 195 | headers: 196 | !binary "Q29udGVudC1UeXBl": 197 | - !binary |- 198 | YXBwbGljYXRpb24vanNvbg== 199 | !binary "RGF0ZQ==": 200 | - !binary |- 201 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNzozMCBHTVQ= 202 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 203 | - !binary |- 204 | Y2h1bmtlZA== 205 | body: 206 | encoding: ASCII-8BIT 207 | string: !binary |- 208 | W3siUGF0aCI6Ii9kZXYiLCJLaW5kIjowfSx7IlBhdGgiOiIvZGV2L2ttc2ci 209 | LCJLaW5kIjoxfSx7IlBhdGgiOiIvdG1wIiwiS2luZCI6MH0seyJQYXRoIjoi 210 | L3RtcC9jaGFuZ2VzIiwiS2luZCI6MX1d 211 | http_version: 212 | recorded_at: Mon, 03 Jun 2013 21:27:30 GMT 213 | - request: 214 | method: get 215 | uri: http://10.0.5.5:4243/containers/c918270027e3/changes 216 | body: 217 | encoding: US-ASCII 218 | string: '' 219 | headers: {} 220 | response: 221 | status: 222 | code: 200 223 | message: !binary |- 224 | T0s= 225 | headers: 226 | !binary "Q29udGVudC1UeXBl": 227 | - !binary |- 228 | YXBwbGljYXRpb24vanNvbg== 229 | !binary "RGF0ZQ==": 230 | - !binary |- 231 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzozMiBHTVQ= 232 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 233 | - !binary |- 234 | Y2h1bmtlZA== 235 | body: 236 | encoding: ASCII-8BIT 237 | string: !binary |- 238 | W3siUGF0aCI6Ii9kZXYiLCJLaW5kIjowfSx7IlBhdGgiOiIvZGV2L2ttc2ci 239 | LCJLaW5kIjoxfSx7IlBhdGgiOiIvdG1wIiwiS2luZCI6MH0seyJQYXRoIjoi 240 | L3RtcC9jaGFuZ2VzIiwiS2luZCI6MX1d 241 | http_version: 242 | recorded_at: Mon, 03 Jun 2013 21:37:32 GMT 243 | recorded_with: VCR 2.5.0 244 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/commit/creates_a_new_image_from_the_container_s_changes.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/commit?author=Docker%20Client&container=59397c6fcc7f&m=Commit%20message&repo=test-repo&tag=test-tag 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 201 13 | message: !binary |- 14 | Q3JlYXRlZA== 15 | headers: 16 | !binary "RGF0ZQ==": 17 | - !binary |- 18 | TW9uLCAwMyBKdW4gMjAxMyAyMTowMDowOSBHTVQ= 19 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 20 | - !binary |- 21 | Y2h1bmtlZA== 22 | !binary "Q29udGVudC1UeXBl": 23 | - !binary |- 24 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | eyJJZCI6IjAyY2QxN2YwYTc4NCJ9 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:00:09 GMT 31 | - request: 32 | method: post 33 | uri: http://10.0.5.5:4243/commit?author=Docker%20Client&container=cd0ad6d65741&m=Commit%20message&repo=test-repo&tag=test-tag 34 | body: 35 | encoding: US-ASCII 36 | string: '' 37 | headers: {} 38 | response: 39 | status: 40 | code: 201 41 | message: !binary |- 42 | Q3JlYXRlZA== 43 | headers: 44 | !binary "RGF0ZQ==": 45 | - !binary |- 46 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDoyMCBHTVQ= 47 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 48 | - !binary |- 49 | Y2h1bmtlZA== 50 | !binary "Q29udGVudC1UeXBl": 51 | - !binary |- 52 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 53 | body: 54 | encoding: ASCII-8BIT 55 | string: !binary |- 56 | eyJJZCI6ImQwZjY4NDg4ZjY2MSJ9 57 | http_version: 58 | recorded_at: Mon, 03 Jun 2013 21:04:20 GMT 59 | - request: 60 | method: post 61 | uri: http://10.0.5.5:4243/commit?author=Docker%20Client&container=7913afb1999e&m=Commit%20message&repo=test-repo&tag=test-tag 62 | body: 63 | encoding: US-ASCII 64 | string: '' 65 | headers: {} 66 | response: 67 | status: 68 | code: 201 69 | message: !binary |- 70 | Q3JlYXRlZA== 71 | headers: 72 | !binary "RGF0ZQ==": 73 | - !binary |- 74 | TW9uLCAwMyBKdW4gMjAxMyAyMToxMDowNSBHTVQ= 75 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 76 | - !binary |- 77 | Y2h1bmtlZA== 78 | !binary "Q29udGVudC1UeXBl": 79 | - !binary |- 80 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 81 | body: 82 | encoding: ASCII-8BIT 83 | string: !binary |- 84 | eyJJZCI6IjM1ZTVjOGYzZWVjNyJ9 85 | http_version: 86 | recorded_at: Mon, 03 Jun 2013 21:10:05 GMT 87 | - request: 88 | method: post 89 | uri: http://10.0.5.5:4243/commit?author=Docker%20Client&container=ec3ca1865f3a&m=Commit%20message&repo=test-repo&tag=test-tag 90 | body: 91 | encoding: US-ASCII 92 | string: '' 93 | headers: {} 94 | response: 95 | status: 96 | code: 201 97 | message: !binary |- 98 | Q3JlYXRlZA== 99 | headers: 100 | !binary "RGF0ZQ==": 101 | - !binary |- 102 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMTozOCBHTVQ= 103 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 104 | - !binary |- 105 | Y2h1bmtlZA== 106 | !binary "Q29udGVudC1UeXBl": 107 | - !binary |- 108 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 109 | body: 110 | encoding: ASCII-8BIT 111 | string: !binary |- 112 | eyJJZCI6ImEzNDUxZTM2OGM5NiJ9 113 | http_version: 114 | recorded_at: Mon, 03 Jun 2013 21:21:38 GMT 115 | - request: 116 | method: post 117 | uri: http://10.0.5.5:4243/commit?author=Docker%20Client&container=7f0f7e0baedc&m=Commit%20message&repo=test-repo&tag=test-tag 118 | body: 119 | encoding: US-ASCII 120 | string: '' 121 | headers: {} 122 | response: 123 | status: 124 | code: 201 125 | message: !binary |- 126 | Q3JlYXRlZA== 127 | headers: 128 | !binary "RGF0ZQ==": 129 | - !binary |- 130 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNTozMiBHTVQ= 131 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 132 | - !binary |- 133 | Y2h1bmtlZA== 134 | !binary "Q29udGVudC1UeXBl": 135 | - !binary |- 136 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 137 | body: 138 | encoding: ASCII-8BIT 139 | string: !binary |- 140 | eyJJZCI6IjM4NGNjNzFmNzVmNSJ9 141 | http_version: 142 | recorded_at: Mon, 03 Jun 2013 21:25:32 GMT 143 | - request: 144 | method: post 145 | uri: http://10.0.5.5:4243/commit?author=Docker%20Client&container=efc1661a7b42&m=Commit%20message&repo=test-repo&tag=test-tag 146 | body: 147 | encoding: US-ASCII 148 | string: '' 149 | headers: {} 150 | response: 151 | status: 152 | code: 201 153 | message: !binary |- 154 | Q3JlYXRlZA== 155 | headers: 156 | !binary "RGF0ZQ==": 157 | - !binary |- 158 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNjo1MSBHTVQ= 159 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 160 | - !binary |- 161 | Y2h1bmtlZA== 162 | !binary "Q29udGVudC1UeXBl": 163 | - !binary |- 164 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 165 | body: 166 | encoding: ASCII-8BIT 167 | string: !binary |- 168 | eyJJZCI6IjJhNzJmZDg5MGMwMyJ9 169 | http_version: 170 | recorded_at: Mon, 03 Jun 2013 21:26:51 GMT 171 | - request: 172 | method: post 173 | uri: http://10.0.5.5:4243/commit?author=Docker%20Client&container=054430dc097d&m=Commit%20message&repo=test-repo&tag=test-tag 174 | body: 175 | encoding: US-ASCII 176 | string: '' 177 | headers: {} 178 | response: 179 | status: 180 | code: 201 181 | message: !binary |- 182 | Q3JlYXRlZA== 183 | headers: 184 | !binary "RGF0ZQ==": 185 | - !binary |- 186 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo0MyBHTVQ= 187 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 188 | - !binary |- 189 | Y2h1bmtlZA== 190 | !binary "Q29udGVudC1UeXBl": 191 | - !binary |- 192 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 193 | body: 194 | encoding: ASCII-8BIT 195 | string: !binary |- 196 | eyJJZCI6IjZiMzBmNTk2NmNmNyJ9 197 | http_version: 198 | recorded_at: Mon, 03 Jun 2013 21:37:43 GMT 199 | recorded_with: VCR 2.5.0 200 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/commit/raises_an_exception_for_an_unknown_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/commit?container=invalid_id&repo=test-repo 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo0MyBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | Tm8gc3VjaCBjb250YWluZXI6IGludmFsaWRfaWQK 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:43 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/create/raises_an_exception_when_called_with_invalid_options.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"PortSpecs":"443","Cmd":["echo","hello world"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 500 15 | message: !binary |- 16 | SW50ZXJuYWwgU2VydmVyIEVycm9y 17 | headers: 18 | !binary "Q29udGVudC1UeXBl": 19 | - !binary |- 20 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 21 | !binary "RGF0ZQ==": 22 | - !binary |- 23 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoyMyBHTVQ= 24 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 25 | - !binary |- 26 | Y2h1bmtlZA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | anNvbjogY2Fubm90IHVubWFyc2hhbCBzdHJpbmcgaW50byBHbyB2YWx1ZSBv 31 | ZiB0eXBlIFtdc3RyaW5nCg== 32 | http_version: 33 | recorded_at: Mon, 03 Jun 2013 21:37:23 GMT 34 | recorded_with: VCR 2.5.0 35 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/create/with_many_settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Hostname":"test-container","User":"test","Memory":33554432,"MemorySwap":67108864,"CpuShares":1,"AttachStdin":false,"AttachStdout":true,"AttachStderr":true,"PortSpecs":["80","443"],"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PORT=5000","ENVIRONTMENT=production"],"Dns":null,"Volumes":{"/var/lib/app":{}},"VolumesFrom":"","Cmd":["echo","hello 9 | world"],"Image":"base"}' 10 | headers: 11 | Content-Type: 12 | - application/json 13 | response: 14 | status: 15 | code: 201 16 | message: !binary |- 17 | Q3JlYXRlZA== 18 | headers: 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoyMyBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | !binary "Q29udGVudC1UeXBl": 26 | - !binary |- 27 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 28 | body: 29 | encoding: ASCII-8BIT 30 | string: !binary |- 31 | eyJJZCI6ImUyNzA4Y2E0YjQ3NSIsIldhcm5pbmdzIjpbIllvdXIga2VybmVs 32 | IGRvZXMgbm90IHN1cHBvcnQgbWVtb3J5IHN3YXAgY2FwYWJpbGl0aWVzLiBM 33 | aW1pdGF0aW9uIGRpc2NhcmRlZC4iXX0= 34 | http_version: 35 | recorded_at: Mon, 03 Jun 2013 21:37:23 GMT 36 | recorded_with: VCR 2.5.0 37 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/create/with_minimal_settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["/bin/sh","-c","while true; do echo hello world; sleep 1; 9 | done"],"Image":"base"}' 10 | headers: 11 | Content-Type: 12 | - application/json 13 | response: 14 | status: 15 | code: 201 16 | message: !binary |- 17 | Q3JlYXRlZA== 18 | headers: 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoyMyBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | !binary "Q29udGVudC1UeXBl": 26 | - !binary |- 27 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 28 | body: 29 | encoding: ASCII-8BIT 30 | string: !binary |- 31 | eyJJZCI6IjQzZWU0MjE5ZTY5YiJ9 32 | http_version: 33 | recorded_at: Mon, 03 Jun 2013 21:37:22 GMT 34 | recorded_with: VCR 2.5.0 35 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/kill/raises_an_exception_for_an_unknow_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/invalid_id/kill 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo0MiBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | Tm8gc3VjaCBjb250YWluZXI6IGludmFsaWRfaWQK 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:42 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/kill/the_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/9f79b401cf57/kill 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 204 13 | message: !binary |- 14 | Tm8gQ29udGVudA== 15 | headers: 16 | !binary "RGF0ZQ==": 17 | - !binary |- 18 | U2F0LCAyNSBNYXkgMjAxMyAxNjowNTozMiBHTVQ= 19 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 20 | - !binary |- 21 | Y2h1bmtlZA== 22 | !binary "Q29udGVudC1UeXBl": 23 | - !binary |- 24 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary "" 28 | http_version: 29 | recorded_at: Sat, 25 May 2013 16:05:34 GMT 30 | - request: 31 | method: post 32 | uri: http://10.0.5.5:4243/containers/f74d695afda5/kill 33 | body: 34 | encoding: US-ASCII 35 | string: '' 36 | headers: {} 37 | response: 38 | status: 39 | code: 204 40 | message: !binary |- 41 | Tm8gQ29udGVudA== 42 | headers: 43 | !binary "RGF0ZQ==": 44 | - !binary |- 45 | TW9uLCAwMyBKdW4gMjAxMyAyMDo1OTozOSBHTVQ= 46 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 47 | - !binary |- 48 | Y2h1bmtlZA== 49 | !binary "Q29udGVudC1UeXBl": 50 | - !binary |- 51 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 52 | body: 53 | encoding: ASCII-8BIT 54 | string: !binary "" 55 | http_version: 56 | recorded_at: Mon, 03 Jun 2013 20:59:39 GMT 57 | - request: 58 | method: post 59 | uri: http://10.0.5.5:4243/containers/c57a3a2b3356/kill 60 | body: 61 | encoding: US-ASCII 62 | string: '' 63 | headers: {} 64 | response: 65 | status: 66 | code: 204 67 | message: !binary |- 68 | Tm8gQ29udGVudA== 69 | headers: 70 | !binary "RGF0ZQ==": 71 | - !binary |- 72 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDowOSBHTVQ= 73 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 74 | - !binary |- 75 | Y2h1bmtlZA== 76 | !binary "Q29udGVudC1UeXBl": 77 | - !binary |- 78 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 79 | body: 80 | encoding: ASCII-8BIT 81 | string: !binary "" 82 | http_version: 83 | recorded_at: Mon, 03 Jun 2013 21:04:09 GMT 84 | - request: 85 | method: post 86 | uri: http://10.0.5.5:4243/containers/2654478ec450/kill 87 | body: 88 | encoding: US-ASCII 89 | string: '' 90 | headers: {} 91 | response: 92 | status: 93 | code: 204 94 | message: !binary |- 95 | Tm8gQ29udGVudA== 96 | headers: 97 | !binary "RGF0ZQ==": 98 | - !binary |- 99 | TW9uLCAwMyBKdW4gMjAxMyAyMTowOTo0OSBHTVQ= 100 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 101 | - !binary |- 102 | Y2h1bmtlZA== 103 | !binary "Q29udGVudC1UeXBl": 104 | - !binary |- 105 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 106 | body: 107 | encoding: ASCII-8BIT 108 | string: !binary "" 109 | http_version: 110 | recorded_at: Mon, 03 Jun 2013 21:09:49 GMT 111 | - request: 112 | method: post 113 | uri: http://10.0.5.5:4243/containers/fba69c3aa5a3/kill 114 | body: 115 | encoding: US-ASCII 116 | string: '' 117 | headers: {} 118 | response: 119 | status: 120 | code: 204 121 | message: !binary |- 122 | Tm8gQ29udGVudA== 123 | headers: 124 | !binary "RGF0ZQ==": 125 | - !binary |- 126 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMToyOSBHTVQ= 127 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 128 | - !binary |- 129 | Y2h1bmtlZA== 130 | !binary "Q29udGVudC1UeXBl": 131 | - !binary |- 132 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 133 | body: 134 | encoding: ASCII-8BIT 135 | string: !binary "" 136 | http_version: 137 | recorded_at: Mon, 03 Jun 2013 21:21:29 GMT 138 | - request: 139 | method: post 140 | uri: http://10.0.5.5:4243/containers/71b771abc587/kill 141 | body: 142 | encoding: US-ASCII 143 | string: '' 144 | headers: {} 145 | response: 146 | status: 147 | code: 204 148 | message: !binary |- 149 | Tm8gQ29udGVudA== 150 | headers: 151 | !binary "RGF0ZQ==": 152 | - !binary |- 153 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNTo0MiBHTVQ= 154 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 155 | - !binary |- 156 | Y2h1bmtlZA== 157 | !binary "Q29udGVudC1UeXBl": 158 | - !binary |- 159 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 160 | body: 161 | encoding: ASCII-8BIT 162 | string: !binary "" 163 | http_version: 164 | recorded_at: Mon, 03 Jun 2013 21:25:42 GMT 165 | - request: 166 | method: post 167 | uri: http://10.0.5.5:4243/containers/baa98613a2bd/kill 168 | body: 169 | encoding: US-ASCII 170 | string: '' 171 | headers: {} 172 | response: 173 | status: 174 | code: 204 175 | message: !binary |- 176 | Tm8gQ29udGVudA== 177 | headers: 178 | !binary "RGF0ZQ==": 179 | - !binary |- 180 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNjo0OSBHTVQ= 181 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 182 | - !binary |- 183 | Y2h1bmtlZA== 184 | !binary "Q29udGVudC1UeXBl": 185 | - !binary |- 186 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 187 | body: 188 | encoding: ASCII-8BIT 189 | string: !binary "" 190 | http_version: 191 | recorded_at: Mon, 03 Jun 2013 21:26:49 GMT 192 | - request: 193 | method: post 194 | uri: http://10.0.5.5:4243/containers/12810f7538e4/kill 195 | body: 196 | encoding: US-ASCII 197 | string: '' 198 | headers: {} 199 | response: 200 | status: 201 | code: 204 202 | message: !binary |- 203 | Tm8gQ29udGVudA== 204 | headers: 205 | !binary "RGF0ZQ==": 206 | - !binary |- 207 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo0MiBHTVQ= 208 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 209 | - !binary |- 210 | Y2h1bmtlZA== 211 | !binary "Q29udGVudC1UeXBl": 212 | - !binary |- 213 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 214 | body: 215 | encoding: ASCII-8BIT 216 | string: !binary "" 217 | http_version: 218 | recorded_at: Mon, 03 Jun 2013 21:37:41 GMT 219 | recorded_with: VCR 2.5.0 220 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/lists/all_running_containers.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/containers/ps 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoxNiBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W3siSWQiOiJhYWY1NjBkYmVkZTk2YzZhZjFlNWM5ZDQwNjc3NDAwMDFlYzM0 29 | NDgwNDU0MDE5YTI3ZmU2M2VmNzRmYWY4MzAyIiwiSW1hZ2UiOiJiYXNlOmxh 30 | dGVzdCIsIkNvbW1hbmQiOiIvYmluL3NoIC1jIHdoaWxlIHRydWU7IGRvIGVj 31 | aG8gaGVsbG8gd29ybGQ7IHNsZWVwIDE7IGRvbmUiLCJDcmVhdGVkIjoxMzcw 32 | Mjk1NDM1LCJTdGF0dXMiOiJVcCBMZXNzIHRoYW4gYSBzZWNvbmQiLCJQb3J0 33 | cyI6IiJ9XQ== 34 | http_version: 35 | recorded_at: Mon, 03 Jun 2013 21:37:16 GMT 36 | recorded_with: VCR 2.5.0 37 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/lists/limit_last_created_containers.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/containers/ps?limit=1 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoxNiBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W3siSWQiOiIyODY3MGNmZWE0ZWMzMGE1OWYwZGE4OTgwNDQ2OWYxZWM2MzU3 29 | MGNhMzg3YWJhMGRlZDY3ZThjZjE3MzkwNjAwIiwiSW1hZ2UiOiJiYXNlOmxh 30 | dGVzdCIsIkNvbW1hbmQiOiJlbnYgIiwiQ3JlYXRlZCI6MTM3MDI5NTQzNiwi 31 | U3RhdHVzIjoiRXhpdCAwIiwiUG9ydHMiOiIifV0= 32 | http_version: 33 | recorded_at: Mon, 03 Jun 2013 21:37:16 GMT 34 | recorded_with: VCR 2.5.0 35 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/lists/non-running_processes_too.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/containers/ps?all=true 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoxNiBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W3siSWQiOiIyODY3MGNmZWE0ZWMzMGE1OWYwZGE4OTgwNDQ2OWYxZWM2MzU3 29 | MGNhMzg3YWJhMGRlZDY3ZThjZjE3MzkwNjAwIiwiSW1hZ2UiOiJiYXNlOmxh 30 | dGVzdCIsIkNvbW1hbmQiOiJlbnYgIiwiQ3JlYXRlZCI6MTM3MDI5NTQzNiwi 31 | U3RhdHVzIjoiRXhpdCAwIiwiUG9ydHMiOiIifSx7IklkIjoiYWFmNTYwZGJl 32 | ZGU5NmM2YWYxZTVjOWQ0MDY3NzQwMDAxZWMzNDQ4MDQ1NDAxOWEyN2ZlNjNl 33 | Zjc0ZmFmODMwMiIsIkltYWdlIjoiYmFzZTpsYXRlc3QiLCJDb21tYW5kIjoi 34 | L2Jpbi9zaCAtYyB3aGlsZSB0cnVlOyBkbyBlY2hvIGhlbGxvIHdvcmxkOyBz 35 | bGVlcCAxOyBkb25lIiwiQ3JlYXRlZCI6MTM3MDI5NTQzNSwiU3RhdHVzIjoi 36 | VXAgTGVzcyB0aGFuIGEgc2Vjb25kIiwiUG9ydHMiOiIifV0= 37 | http_version: 38 | recorded_at: Mon, 03 Jun 2013 21:37:16 GMT 39 | recorded_with: VCR 2.5.0 40 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/lists/processes_since_a_certain_created_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/containers/ps?since=12433dcd5b7a 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | U2F0LCAyNSBNYXkgMjAxMyAxNjowNToxMyBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W3siSWQiOiIyZTMxMWMxMjFhMjg2ZWM4MGJlMDMwMWQxMjcxMGRkOGExZGUw 29 | ZDM1OGZjNDZlYjE2NGIwMzNiMWY3Y2M2ZGZmIiwiSW1hZ2UiOiJiYXNlOmxh 30 | dGVzdCIsIkNvbW1hbmQiOiJlbnYgIiwiQ3JlYXRlZCI6MTM2OTQ5NzkxMywi 31 | U3RhdHVzIjoiRXhpdCAwIiwiUG9ydHMiOiIifV0= 32 | http_version: 33 | recorded_at: Sat, 25 May 2013 16:05:15 GMT 34 | - request: 35 | method: get 36 | uri: http://10.0.5.5:4243/containers/ps?since=9fbe2886c95e 37 | body: 38 | encoding: US-ASCII 39 | string: '' 40 | headers: {} 41 | response: 42 | status: 43 | code: 200 44 | message: !binary |- 45 | T0s= 46 | headers: 47 | !binary "Q29udGVudC1UeXBl": 48 | - !binary |- 49 | YXBwbGljYXRpb24vanNvbg== 50 | !binary "RGF0ZQ==": 51 | - !binary |- 52 | TW9uLCAwMyBKdW4gMjAxMyAyMTowMDoxMCBHTVQ= 53 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 54 | - !binary |- 55 | Y2h1bmtlZA== 56 | body: 57 | encoding: ASCII-8BIT 58 | string: !binary |- 59 | W3siSWQiOiIyNTVmNDZlZGMyMDhlZDU5YWY2NzIzNzRlYzI1NGY1NzA1OTYy 60 | NDUwYzBkNTJiYWFlNThmMTU3MzIwYzU0M2UwIiwiSW1hZ2UiOiJiYXNlOmxh 61 | dGVzdCIsIkNvbW1hbmQiOiJlbnYgIiwiQ3JlYXRlZCI6MTM3MDI5MzIwOSwi 62 | U3RhdHVzIjoiRXhpdCAwIiwiUG9ydHMiOiIifV0= 63 | http_version: 64 | recorded_at: Mon, 03 Jun 2013 21:00:10 GMT 65 | - request: 66 | method: get 67 | uri: http://10.0.5.5:4243/containers/ps?since=a0103f91609f 68 | body: 69 | encoding: US-ASCII 70 | string: '' 71 | headers: {} 72 | response: 73 | status: 74 | code: 200 75 | message: !binary |- 76 | T0s= 77 | headers: 78 | !binary "Q29udGVudC1UeXBl": 79 | - !binary |- 80 | YXBwbGljYXRpb24vanNvbg== 81 | !binary "RGF0ZQ==": 82 | - !binary |- 83 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDoyMiBHTVQ= 84 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 85 | - !binary |- 86 | Y2h1bmtlZA== 87 | body: 88 | encoding: ASCII-8BIT 89 | string: !binary |- 90 | W3siSWQiOiJmOGEyOTdmMzc5YTQzOGU1N2EwOTM4Y2VlZTZkNzViZDI5ZmU5 91 | ZDQwZmUwYmM3ZTE3ZTcwMzhiOGRjMWUzMWMwIiwiSW1hZ2UiOiJiYXNlOmxh 92 | dGVzdCIsIkNvbW1hbmQiOiJlbnYgIiwiQ3JlYXRlZCI6MTM3MDI5MzQ2Miwi 93 | U3RhdHVzIjoiRXhpdCAwIiwiUG9ydHMiOiIifV0= 94 | http_version: 95 | recorded_at: Mon, 03 Jun 2013 21:04:22 GMT 96 | - request: 97 | method: get 98 | uri: http://10.0.5.5:4243/containers/ps?since=c158a9975d79 99 | body: 100 | encoding: US-ASCII 101 | string: '' 102 | headers: {} 103 | response: 104 | status: 105 | code: 200 106 | message: !binary |- 107 | T0s= 108 | headers: 109 | !binary "Q29udGVudC1UeXBl": 110 | - !binary |- 111 | YXBwbGljYXRpb24vanNvbg== 112 | !binary "RGF0ZQ==": 113 | - !binary |- 114 | TW9uLCAwMyBKdW4gMjAxMyAyMTowOTo1MCBHTVQ= 115 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 116 | - !binary |- 117 | Y2h1bmtlZA== 118 | body: 119 | encoding: ASCII-8BIT 120 | string: !binary |- 121 | W3siSWQiOiIyMDMzMzNhZTYzMWViZTA2OWEwN2RhODMyMDI4ZDdjMTYwODI0 122 | YWIyMDlmNDEyZWI0MDg3ZTMzNzhkOTExMTFmIiwiSW1hZ2UiOiJiYXNlOmxh 123 | dGVzdCIsIkNvbW1hbmQiOiJlbnYgIiwiQ3JlYXRlZCI6MTM3MDI5Mzc5MCwi 124 | U3RhdHVzIjoiRXhpdCAwIiwiUG9ydHMiOiIifV0= 125 | http_version: 126 | recorded_at: Mon, 03 Jun 2013 21:09:50 GMT 127 | - request: 128 | method: get 129 | uri: http://10.0.5.5:4243/containers/ps?since=c8c728c948f2 130 | body: 131 | encoding: US-ASCII 132 | string: '' 133 | headers: {} 134 | response: 135 | status: 136 | code: 200 137 | message: !binary |- 138 | T0s= 139 | headers: 140 | !binary "Q29udGVudC1UeXBl": 141 | - !binary |- 142 | YXBwbGljYXRpb24vanNvbg== 143 | !binary "RGF0ZQ==": 144 | - !binary |- 145 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMTo0MCBHTVQ= 146 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 147 | - !binary |- 148 | Y2h1bmtlZA== 149 | body: 150 | encoding: ASCII-8BIT 151 | string: !binary |- 152 | W3siSWQiOiJhMjVkMzY4NTMyMTljM2FmZTg4M2QwZmVjNTRmYTIxOGJhMjZm 153 | NWRmYTIzOTQ5NjM0ZmY5YzExMzg0NTBlN2JhIiwiSW1hZ2UiOiJiYXNlOmxh 154 | dGVzdCIsIkNvbW1hbmQiOiJlbnYgIiwiQ3JlYXRlZCI6MTM3MDI5NDQ5OSwi 155 | U3RhdHVzIjoiRXhpdCAwIiwiUG9ydHMiOiIifV0= 156 | http_version: 157 | recorded_at: Mon, 03 Jun 2013 21:21:40 GMT 158 | - request: 159 | method: get 160 | uri: http://10.0.5.5:4243/containers/ps?since=6ef14fa6bb56 161 | body: 162 | encoding: US-ASCII 163 | string: '' 164 | headers: {} 165 | response: 166 | status: 167 | code: 200 168 | message: !binary |- 169 | T0s= 170 | headers: 171 | !binary "Q29udGVudC1UeXBl": 172 | - !binary |- 173 | YXBwbGljYXRpb24vanNvbg== 174 | !binary "RGF0ZQ==": 175 | - !binary |- 176 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNTo0NyBHTVQ= 177 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 178 | - !binary |- 179 | Y2h1bmtlZA== 180 | body: 181 | encoding: ASCII-8BIT 182 | string: !binary |- 183 | W3siSWQiOiJjNjc4OTA1YjM3MTkyODM2Y2Q1YjZhNzNlZTkzZGIzNjkwYzI4 184 | YTcyNDRmYjFlMTVhYmMyMTk2NjQ3ODljN2M2IiwiSW1hZ2UiOiJiYXNlOmxh 185 | dGVzdCIsIkNvbW1hbmQiOiJlbnYgIiwiQ3JlYXRlZCI6MTM3MDI5NDc0Nywi 186 | U3RhdHVzIjoiRXhpdCAwIiwiUG9ydHMiOiIifV0= 187 | http_version: 188 | recorded_at: Mon, 03 Jun 2013 21:25:47 GMT 189 | - request: 190 | method: get 191 | uri: http://10.0.5.5:4243/containers/ps?since=35b71bf52d13 192 | body: 193 | encoding: US-ASCII 194 | string: '' 195 | headers: {} 196 | response: 197 | status: 198 | code: 200 199 | message: !binary |- 200 | T0s= 201 | headers: 202 | !binary "Q29udGVudC1UeXBl": 203 | - !binary |- 204 | YXBwbGljYXRpb24vanNvbg== 205 | !binary "RGF0ZQ==": 206 | - !binary |- 207 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNzowMyBHTVQ= 208 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 209 | - !binary |- 210 | Y2h1bmtlZA== 211 | body: 212 | encoding: ASCII-8BIT 213 | string: !binary |- 214 | W3siSWQiOiI1Zjc4ODMxYmIzMmU3N2VhMTYzODlkMzRhYTc5ZjMwZGIxNjc4 215 | M2RhMjRlM2QyOTM4ZDI2OGJjZGJlNWQyYjM4IiwiSW1hZ2UiOiJiYXNlOmxh 216 | dGVzdCIsIkNvbW1hbmQiOiJlbnYgIiwiQ3JlYXRlZCI6MTM3MDI5NDgyMywi 217 | U3RhdHVzIjoiRXhpdCAwIiwiUG9ydHMiOiIifV0= 218 | http_version: 219 | recorded_at: Mon, 03 Jun 2013 21:27:03 GMT 220 | - request: 221 | method: get 222 | uri: http://10.0.5.5:4243/containers/ps?since=aaf560dbede9 223 | body: 224 | encoding: US-ASCII 225 | string: '' 226 | headers: {} 227 | response: 228 | status: 229 | code: 200 230 | message: !binary |- 231 | T0s= 232 | headers: 233 | !binary "Q29udGVudC1UeXBl": 234 | - !binary |- 235 | YXBwbGljYXRpb24vanNvbg== 236 | !binary "RGF0ZQ==": 237 | - !binary |- 238 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoxNiBHTVQ= 239 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 240 | - !binary |- 241 | Y2h1bmtlZA== 242 | body: 243 | encoding: ASCII-8BIT 244 | string: !binary |- 245 | W3siSWQiOiIyODY3MGNmZWE0ZWMzMGE1OWYwZGE4OTgwNDQ2OWYxZWM2MzU3 246 | MGNhMzg3YWJhMGRlZDY3ZThjZjE3MzkwNjAwIiwiSW1hZ2UiOiJiYXNlOmxh 247 | dGVzdCIsIkNvbW1hbmQiOiJlbnYgIiwiQ3JlYXRlZCI6MTM3MDI5NTQzNiwi 248 | U3RhdHVzIjoiRXhpdCAwIiwiUG9ydHMiOiIifV0= 249 | http_version: 250 | recorded_at: Mon, 03 Jun 2013 21:37:16 GMT 251 | recorded_with: VCR 2.5.0 252 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/logs/raises_an_exception_for_an_unknown_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/invalid_id/attach?logs=true&stderr=true&stdout=true&stream=false 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo0NSBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | Tm8gc3VjaCBjb250YWluZXI6IGludmFsaWRfaWQK 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:45 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/logs/returns_the_stderr_of_a_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/167951f02581/attach?logs=true&stderr=true&stream=false 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 19 | body: 20 | encoding: ASCII-8BIT 21 | string: !binary |- 22 | c3RkZXJyCg== 23 | http_version: 24 | recorded_at: Sat, 25 May 2013 16:05:27 GMT 25 | - request: 26 | method: post 27 | uri: http://10.0.5.5:4243/containers/512c3ce5fbee/attach?logs=true&stderr=true&stream=false 28 | body: 29 | encoding: US-ASCII 30 | string: '' 31 | headers: {} 32 | response: 33 | status: 34 | code: 200 35 | message: !binary |- 36 | T0s= 37 | headers: 38 | !binary "Q29udGVudC1UeXBl": 39 | - !binary |- 40 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 41 | body: 42 | encoding: ASCII-8BIT 43 | string: !binary |- 44 | c3RkZXJyCg== 45 | http_version: 46 | recorded_at: Mon, 03 Jun 2013 20:59:54 GMT 47 | - request: 48 | method: post 49 | uri: http://10.0.5.5:4243/containers/003acb404098/attach?logs=true&stderr=true&stream=false 50 | body: 51 | encoding: US-ASCII 52 | string: '' 53 | headers: {} 54 | response: 55 | status: 56 | code: 200 57 | message: !binary |- 58 | T0s= 59 | headers: 60 | !binary "Q29udGVudC1UeXBl": 61 | - !binary |- 62 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 63 | body: 64 | encoding: ASCII-8BIT 65 | string: !binary |- 66 | c3RkZXJyCg== 67 | http_version: 68 | recorded_at: Mon, 03 Jun 2013 21:04:32 GMT 69 | - request: 70 | method: post 71 | uri: http://10.0.5.5:4243/containers/8b353ded3343/attach?logs=true&stderr=true&stream=false 72 | body: 73 | encoding: US-ASCII 74 | string: '' 75 | headers: {} 76 | response: 77 | status: 78 | code: 200 79 | message: !binary |- 80 | T0s= 81 | headers: 82 | !binary "Q29udGVudC1UeXBl": 83 | - !binary |- 84 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 85 | body: 86 | encoding: ASCII-8BIT 87 | string: !binary |- 88 | c3RkZXJyCg== 89 | http_version: 90 | recorded_at: Mon, 03 Jun 2013 21:09:55 GMT 91 | - request: 92 | method: post 93 | uri: http://10.0.5.5:4243/containers/5cda854c7f2b/attach?logs=true&stderr=true&stream=false 94 | body: 95 | encoding: US-ASCII 96 | string: '' 97 | headers: {} 98 | response: 99 | status: 100 | code: 200 101 | message: !binary |- 102 | T0s= 103 | headers: 104 | !binary "Q29udGVudC1UeXBl": 105 | - !binary |- 106 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 107 | body: 108 | encoding: ASCII-8BIT 109 | string: !binary |- 110 | c3RkZXJyCg== 111 | http_version: 112 | recorded_at: Mon, 03 Jun 2013 21:21:21 GMT 113 | - request: 114 | method: post 115 | uri: http://10.0.5.5:4243/containers/c0ee7f9ab39a/attach?logs=true&stderr=true&stream=false 116 | body: 117 | encoding: US-ASCII 118 | string: '' 119 | headers: {} 120 | response: 121 | status: 122 | code: 200 123 | message: !binary |- 124 | T0s= 125 | headers: 126 | !binary "Q29udGVudC1UeXBl": 127 | - !binary |- 128 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 129 | body: 130 | encoding: ASCII-8BIT 131 | string: !binary |- 132 | c3RkZXJyCg== 133 | http_version: 134 | recorded_at: Mon, 03 Jun 2013 21:25:46 GMT 135 | - request: 136 | method: post 137 | uri: http://10.0.5.5:4243/containers/1c460cabb1ab/attach?logs=true&stderr=true&stream=false 138 | body: 139 | encoding: US-ASCII 140 | string: '' 141 | headers: {} 142 | response: 143 | status: 144 | code: 200 145 | message: !binary |- 146 | T0s= 147 | headers: 148 | !binary "Q29udGVudC1UeXBl": 149 | - !binary |- 150 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 151 | body: 152 | encoding: ASCII-8BIT 153 | string: !binary |- 154 | c3RkZXJyCg== 155 | http_version: 156 | recorded_at: Mon, 03 Jun 2013 21:26:53 GMT 157 | - request: 158 | method: post 159 | uri: http://10.0.5.5:4243/containers/7fe249af9595/attach?logs=true&stderr=true&stream=false 160 | body: 161 | encoding: US-ASCII 162 | string: '' 163 | headers: {} 164 | response: 165 | status: 166 | code: 200 167 | message: !binary |- 168 | T0s= 169 | headers: 170 | !binary "Q29udGVudC1UeXBl": 171 | - !binary |- 172 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 173 | body: 174 | encoding: ASCII-8BIT 175 | string: !binary |- 176 | c3RkZXJyCg== 177 | http_version: 178 | recorded_at: Mon, 03 Jun 2013 21:37:45 GMT 179 | recorded_with: VCR 2.5.0 180 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/logs/returns_the_stdout_of_a_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/167951f02581/attach?logs=true&stdout=true&stream=false 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 19 | body: 20 | encoding: ASCII-8BIT 21 | string: !binary |- 22 | c3Rkb3V0Cg== 23 | http_version: 24 | recorded_at: Sat, 25 May 2013 16:05:26 GMT 25 | - request: 26 | method: post 27 | uri: http://10.0.5.5:4243/containers/512c3ce5fbee/attach?logs=true&stdout=true&stream=false 28 | body: 29 | encoding: US-ASCII 30 | string: '' 31 | headers: {} 32 | response: 33 | status: 34 | code: 200 35 | message: !binary |- 36 | T0s= 37 | headers: 38 | !binary "Q29udGVudC1UeXBl": 39 | - !binary |- 40 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 41 | body: 42 | encoding: ASCII-8BIT 43 | string: !binary |- 44 | c3Rkb3V0Cg== 45 | http_version: 46 | recorded_at: Mon, 03 Jun 2013 20:59:54 GMT 47 | - request: 48 | method: post 49 | uri: http://10.0.5.5:4243/containers/003acb404098/attach?logs=true&stdout=true&stream=false 50 | body: 51 | encoding: US-ASCII 52 | string: '' 53 | headers: {} 54 | response: 55 | status: 56 | code: 200 57 | message: !binary |- 58 | T0s= 59 | headers: 60 | !binary "Q29udGVudC1UeXBl": 61 | - !binary |- 62 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 63 | body: 64 | encoding: ASCII-8BIT 65 | string: !binary |- 66 | c3Rkb3V0Cg== 67 | http_version: 68 | recorded_at: Mon, 03 Jun 2013 21:04:32 GMT 69 | - request: 70 | method: post 71 | uri: http://10.0.5.5:4243/containers/8b353ded3343/attach?logs=true&stdout=true&stream=false 72 | body: 73 | encoding: US-ASCII 74 | string: '' 75 | headers: {} 76 | response: 77 | status: 78 | code: 200 79 | message: !binary |- 80 | T0s= 81 | headers: 82 | !binary "Q29udGVudC1UeXBl": 83 | - !binary |- 84 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 85 | body: 86 | encoding: ASCII-8BIT 87 | string: !binary |- 88 | c3Rkb3V0Cg== 89 | http_version: 90 | recorded_at: Mon, 03 Jun 2013 21:09:55 GMT 91 | - request: 92 | method: post 93 | uri: http://10.0.5.5:4243/containers/5cda854c7f2b/attach?logs=true&stdout=true&stream=false 94 | body: 95 | encoding: US-ASCII 96 | string: '' 97 | headers: {} 98 | response: 99 | status: 100 | code: 200 101 | message: !binary |- 102 | T0s= 103 | headers: 104 | !binary "Q29udGVudC1UeXBl": 105 | - !binary |- 106 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 107 | body: 108 | encoding: ASCII-8BIT 109 | string: !binary |- 110 | c3Rkb3V0Cg== 111 | http_version: 112 | recorded_at: Mon, 03 Jun 2013 21:21:21 GMT 113 | - request: 114 | method: post 115 | uri: http://10.0.5.5:4243/containers/c0ee7f9ab39a/attach?logs=true&stdout=true&stream=false 116 | body: 117 | encoding: US-ASCII 118 | string: '' 119 | headers: {} 120 | response: 121 | status: 122 | code: 200 123 | message: !binary |- 124 | T0s= 125 | headers: 126 | !binary "Q29udGVudC1UeXBl": 127 | - !binary |- 128 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 129 | body: 130 | encoding: ASCII-8BIT 131 | string: !binary |- 132 | c3Rkb3V0Cg== 133 | http_version: 134 | recorded_at: Mon, 03 Jun 2013 21:25:46 GMT 135 | - request: 136 | method: post 137 | uri: http://10.0.5.5:4243/containers/1c460cabb1ab/attach?logs=true&stdout=true&stream=false 138 | body: 139 | encoding: US-ASCII 140 | string: '' 141 | headers: {} 142 | response: 143 | status: 144 | code: 200 145 | message: !binary |- 146 | T0s= 147 | headers: 148 | !binary "Q29udGVudC1UeXBl": 149 | - !binary |- 150 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 151 | body: 152 | encoding: ASCII-8BIT 153 | string: !binary |- 154 | c3Rkb3V0Cg== 155 | http_version: 156 | recorded_at: Mon, 03 Jun 2013 21:26:53 GMT 157 | - request: 158 | method: post 159 | uri: http://10.0.5.5:4243/containers/7fe249af9595/attach?logs=true&stdout=true&stream=false 160 | body: 161 | encoding: US-ASCII 162 | string: '' 163 | headers: {} 164 | response: 165 | status: 166 | code: 200 167 | message: !binary |- 168 | T0s= 169 | headers: 170 | !binary "Q29udGVudC1UeXBl": 171 | - !binary |- 172 | YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt 173 | body: 174 | encoding: ASCII-8BIT 175 | string: !binary |- 176 | c3Rkb3V0Cg== 177 | http_version: 178 | recorded_at: Mon, 03 Jun 2013 21:37:45 GMT 179 | recorded_with: VCR 2.5.0 180 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/remove/deletes_the_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: delete 5 | uri: http://10.0.5.5:4243/containers/123a45fb9f91?v=true 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 204 13 | message: !binary |- 14 | Tm8gQ29udGVudA== 15 | headers: 16 | !binary "RGF0ZQ==": 17 | - !binary |- 18 | U2F0LCAyNSBNYXkgMjAxMyAxNjowNToxMiBHTVQ= 19 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 20 | - !binary |- 21 | Y2h1bmtlZA== 22 | !binary "Q29udGVudC1UeXBl": 23 | - !binary |- 24 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary "" 28 | http_version: 29 | recorded_at: Sat, 25 May 2013 16:05:15 GMT 30 | - request: 31 | method: delete 32 | uri: http://10.0.5.5:4243/containers/e7c0a0002bbe?v=true 33 | body: 34 | encoding: US-ASCII 35 | string: '' 36 | headers: {} 37 | response: 38 | status: 39 | code: 204 40 | message: !binary |- 41 | Tm8gQ29udGVudA== 42 | headers: 43 | !binary "RGF0ZQ==": 44 | - !binary |- 45 | TW9uLCAwMyBKdW4gMjAxMyAyMTowMDowNyBHTVQ= 46 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 47 | - !binary |- 48 | Y2h1bmtlZA== 49 | !binary "Q29udGVudC1UeXBl": 50 | - !binary |- 51 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 52 | body: 53 | encoding: ASCII-8BIT 54 | string: !binary "" 55 | http_version: 56 | recorded_at: Mon, 03 Jun 2013 21:00:07 GMT 57 | - request: 58 | method: delete 59 | uri: http://10.0.5.5:4243/containers/ca0f54b0c015?v=true 60 | body: 61 | encoding: US-ASCII 62 | string: '' 63 | headers: {} 64 | response: 65 | status: 66 | code: 204 67 | message: !binary |- 68 | Tm8gQ29udGVudA== 69 | headers: 70 | !binary "RGF0ZQ==": 71 | - !binary |- 72 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDoxOCBHTVQ= 73 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 74 | - !binary |- 75 | Y2h1bmtlZA== 76 | !binary "Q29udGVudC1UeXBl": 77 | - !binary |- 78 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 79 | body: 80 | encoding: ASCII-8BIT 81 | string: !binary "" 82 | http_version: 83 | recorded_at: Mon, 03 Jun 2013 21:04:18 GMT 84 | - request: 85 | method: delete 86 | uri: http://10.0.5.5:4243/containers/82e903ae7b39?v=true 87 | body: 88 | encoding: US-ASCII 89 | string: '' 90 | headers: {} 91 | response: 92 | status: 93 | code: 204 94 | message: !binary |- 95 | Tm8gQ29udGVudA== 96 | headers: 97 | !binary "RGF0ZQ==": 98 | - !binary |- 99 | TW9uLCAwMyBKdW4gMjAxMyAyMTowOTo0MiBHTVQ= 100 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 101 | - !binary |- 102 | Y2h1bmtlZA== 103 | !binary "Q29udGVudC1UeXBl": 104 | - !binary |- 105 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 106 | body: 107 | encoding: ASCII-8BIT 108 | string: !binary "" 109 | http_version: 110 | recorded_at: Mon, 03 Jun 2013 21:09:42 GMT 111 | - request: 112 | method: delete 113 | uri: http://10.0.5.5:4243/containers/a1d3fc73631a?v=true 114 | body: 115 | encoding: US-ASCII 116 | string: '' 117 | headers: {} 118 | response: 119 | status: 120 | code: 204 121 | message: !binary |- 122 | Tm8gQ29udGVudA== 123 | headers: 124 | !binary "RGF0ZQ==": 125 | - !binary |- 126 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMToyOSBHTVQ= 127 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 128 | - !binary |- 129 | Y2h1bmtlZA== 130 | !binary "Q29udGVudC1UeXBl": 131 | - !binary |- 132 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 133 | body: 134 | encoding: ASCII-8BIT 135 | string: !binary "" 136 | http_version: 137 | recorded_at: Mon, 03 Jun 2013 21:21:29 GMT 138 | - request: 139 | method: delete 140 | uri: http://10.0.5.5:4243/containers/2ac66b08b5f4?v=true 141 | body: 142 | encoding: US-ASCII 143 | string: '' 144 | headers: {} 145 | response: 146 | status: 147 | code: 204 148 | message: !binary |- 149 | Tm8gQ29udGVudA== 150 | headers: 151 | !binary "RGF0ZQ==": 152 | - !binary |- 153 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNTo1OCBHTVQ= 154 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 155 | - !binary |- 156 | Y2h1bmtlZA== 157 | !binary "Q29udGVudC1UeXBl": 158 | - !binary |- 159 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 160 | body: 161 | encoding: ASCII-8BIT 162 | string: !binary "" 163 | http_version: 164 | recorded_at: Mon, 03 Jun 2013 21:25:58 GMT 165 | - request: 166 | method: delete 167 | uri: http://10.0.5.5:4243/containers/ea83c6220f30?v=true 168 | body: 169 | encoding: US-ASCII 170 | string: '' 171 | headers: {} 172 | response: 173 | status: 174 | code: 204 175 | message: !binary |- 176 | Tm8gQ29udGVudA== 177 | headers: 178 | !binary "RGF0ZQ==": 179 | - !binary |- 180 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNzozMCBHTVQ= 181 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 182 | - !binary |- 183 | Y2h1bmtlZA== 184 | !binary "Q29udGVudC1UeXBl": 185 | - !binary |- 186 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 187 | body: 188 | encoding: ASCII-8BIT 189 | string: !binary "" 190 | http_version: 191 | recorded_at: Mon, 03 Jun 2013 21:27:30 GMT 192 | - request: 193 | method: delete 194 | uri: http://10.0.5.5:4243/containers/e884e7306c58?v=true 195 | body: 196 | encoding: US-ASCII 197 | string: '' 198 | headers: {} 199 | response: 200 | status: 201 | code: 204 202 | message: !binary |- 203 | Tm8gQ29udGVudA== 204 | headers: 205 | !binary "RGF0ZQ==": 206 | - !binary |- 207 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1MCBHTVQ= 208 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 209 | - !binary |- 210 | Y2h1bmtlZA== 211 | !binary "Q29udGVudC1UeXBl": 212 | - !binary |- 213 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 214 | body: 215 | encoding: ASCII-8BIT 216 | string: !binary "" 217 | http_version: 218 | recorded_at: Mon, 03 Jun 2013 21:37:50 GMT 219 | recorded_with: VCR 2.5.0 220 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/remove/raises_an_exception_with_an_invalid_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: delete 5 | uri: http://10.0.5.5:4243/containers/invalid_ID?v=false 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1MCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | Tm8gc3VjaCBjb250YWluZXI6IGludmFsaWRfSUQK 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:50 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/restarts/raises_an_exception_for_an_unknown_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/invalid_id/restart 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzozNyBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | Tm8gc3VjaCBjb250YWluZXI6IGludmFsaWRfaWQK 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:36 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/restarts/the_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/3700641d93de/restart?t=3 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 204 13 | message: !binary |- 14 | Tm8gQ29udGVudA== 15 | headers: 16 | !binary "RGF0ZQ==": 17 | - !binary |- 18 | U2F0LCAyNSBNYXkgMjAxMyAxNjowNTozNyBHTVQ= 19 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 20 | - !binary |- 21 | Y2h1bmtlZA== 22 | !binary "Q29udGVudC1UeXBl": 23 | - !binary |- 24 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary "" 28 | http_version: 29 | recorded_at: Sat, 25 May 2013 16:05:39 GMT 30 | - request: 31 | method: post 32 | uri: http://10.0.5.5:4243/containers/a804fa93c116/restart?t=3 33 | body: 34 | encoding: US-ASCII 35 | string: '' 36 | headers: {} 37 | response: 38 | status: 39 | code: 204 40 | message: !binary |- 41 | Tm8gQ29udGVudA== 42 | headers: 43 | !binary "RGF0ZQ==": 44 | - !binary |- 45 | TW9uLCAwMyBKdW4gMjAxMyAyMDo1OTo0MyBHTVQ= 46 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 47 | - !binary |- 48 | Y2h1bmtlZA== 49 | !binary "Q29udGVudC1UeXBl": 50 | - !binary |- 51 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 52 | body: 53 | encoding: ASCII-8BIT 54 | string: !binary "" 55 | http_version: 56 | recorded_at: Mon, 03 Jun 2013 20:59:43 GMT 57 | - request: 58 | method: post 59 | uri: http://10.0.5.5:4243/containers/fb77cac10186/restart?t=3 60 | body: 61 | encoding: US-ASCII 62 | string: '' 63 | headers: {} 64 | response: 65 | status: 66 | code: 204 67 | message: !binary |- 68 | Tm8gQ29udGVudA== 69 | headers: 70 | !binary "RGF0ZQ==": 71 | - !binary |- 72 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDozOSBHTVQ= 73 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 74 | - !binary |- 75 | Y2h1bmtlZA== 76 | !binary "Q29udGVudC1UeXBl": 77 | - !binary |- 78 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 79 | body: 80 | encoding: ASCII-8BIT 81 | string: !binary "" 82 | http_version: 83 | recorded_at: Mon, 03 Jun 2013 21:04:38 GMT 84 | - request: 85 | method: post 86 | uri: http://10.0.5.5:4243/containers/962ec353f955/restart?t=3 87 | body: 88 | encoding: US-ASCII 89 | string: '' 90 | headers: {} 91 | response: 92 | status: 93 | code: 204 94 | message: !binary |- 95 | Tm8gQ29udGVudA== 96 | headers: 97 | !binary "RGF0ZQ==": 98 | - !binary |- 99 | TW9uLCAwMyBKdW4gMjAxMyAyMToxMDoxMCBHTVQ= 100 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 101 | - !binary |- 102 | Y2h1bmtlZA== 103 | !binary "Q29udGVudC1UeXBl": 104 | - !binary |- 105 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 106 | body: 107 | encoding: ASCII-8BIT 108 | string: !binary "" 109 | http_version: 110 | recorded_at: Mon, 03 Jun 2013 21:10:10 GMT 111 | - request: 112 | method: post 113 | uri: http://10.0.5.5:4243/containers/08a82b20530c/restart?t=3 114 | body: 115 | encoding: US-ASCII 116 | string: '' 117 | headers: {} 118 | response: 119 | status: 120 | code: 204 121 | message: !binary |- 122 | Tm8gQ29udGVudA== 123 | headers: 124 | !binary "RGF0ZQ==": 125 | - !binary |- 126 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMTozMyBHTVQ= 127 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 128 | - !binary |- 129 | Y2h1bmtlZA== 130 | !binary "Q29udGVudC1UeXBl": 131 | - !binary |- 132 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 133 | body: 134 | encoding: ASCII-8BIT 135 | string: !binary "" 136 | http_version: 137 | recorded_at: Mon, 03 Jun 2013 21:21:33 GMT 138 | - request: 139 | method: post 140 | uri: http://10.0.5.5:4243/containers/0195b66d6098/restart?t=3 141 | body: 142 | encoding: US-ASCII 143 | string: '' 144 | headers: {} 145 | response: 146 | status: 147 | code: 204 148 | message: !binary |- 149 | Tm8gQ29udGVudA== 150 | headers: 151 | !binary "RGF0ZQ==": 152 | - !binary |- 153 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNTozNyBHTVQ= 154 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 155 | - !binary |- 156 | Y2h1bmtlZA== 157 | !binary "Q29udGVudC1UeXBl": 158 | - !binary |- 159 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 160 | body: 161 | encoding: ASCII-8BIT 162 | string: !binary "" 163 | http_version: 164 | recorded_at: Mon, 03 Jun 2013 21:25:37 GMT 165 | - request: 166 | method: post 167 | uri: http://10.0.5.5:4243/containers/99bec7332d4c/restart?t=3 168 | body: 169 | encoding: US-ASCII 170 | string: '' 171 | headers: {} 172 | response: 173 | status: 174 | code: 204 175 | message: !binary |- 176 | Tm8gQ29udGVudA== 177 | headers: 178 | !binary "RGF0ZQ==": 179 | - !binary |- 180 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNjo1OSBHTVQ= 181 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 182 | - !binary |- 183 | Y2h1bmtlZA== 184 | !binary "Q29udGVudC1UeXBl": 185 | - !binary |- 186 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 187 | body: 188 | encoding: ASCII-8BIT 189 | string: !binary "" 190 | http_version: 191 | recorded_at: Mon, 03 Jun 2013 21:26:59 GMT 192 | - request: 193 | method: post 194 | uri: http://10.0.5.5:4243/containers/ec184f91e1b7/restart?t=3 195 | body: 196 | encoding: US-ASCII 197 | string: '' 198 | headers: {} 199 | response: 200 | status: 201 | code: 204 202 | message: !binary |- 203 | Tm8gQ29udGVudA== 204 | headers: 205 | !binary "RGF0ZQ==": 206 | - !binary |- 207 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzozNiBHTVQ= 208 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 209 | - !binary |- 210 | Y2h1bmtlZA== 211 | !binary "Q29udGVudC1UeXBl": 212 | - !binary |- 213 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 214 | body: 215 | encoding: ASCII-8BIT 216 | string: !binary "" 217 | http_version: 218 | recorded_at: Mon, 03 Jun 2013 21:37:36 GMT 219 | recorded_with: VCR 2.5.0 220 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/shows/raises_an_exception_for_an_unknown_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/containers/invalid_id/json 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: Not Found 14 | headers: 15 | Content-Type: 16 | - text/plain; charset=utf-8 17 | Date: 18 | - Thu, 13 Jun 2013 18:47:07 GMT 19 | Transfer-Encoding: 20 | - chunked 21 | body: 22 | encoding: ASCII-8BIT 23 | string: | 24 | No such container: invalid_id 25 | http_version: 26 | recorded_at: Thu, 13 Jun 2013 18:47:07 GMT 27 | recorded_with: VCR 2.5.0 28 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/start/brings_a_container_into_state_running.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/1d77a3257ed8/start 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 204 13 | message: !binary |- 14 | Tm8gQ29udGVudA== 15 | headers: 16 | !binary "RGF0ZQ==": 17 | - !binary |- 18 | U2F0LCAyNSBNYXkgMjAxMyAxNjowNToyNSBHTVQ= 19 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 20 | - !binary |- 21 | Y2h1bmtlZA== 22 | !binary "Q29udGVudC1UeXBl": 23 | - !binary |- 24 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary "" 28 | http_version: 29 | recorded_at: Sat, 25 May 2013 16:05:27 GMT 30 | - request: 31 | method: post 32 | uri: http://10.0.5.5:4243/containers/bb8a8de1c715/start 33 | body: 34 | encoding: US-ASCII 35 | string: '' 36 | headers: {} 37 | response: 38 | status: 39 | code: 204 40 | message: !binary |- 41 | Tm8gQ29udGVudA== 42 | headers: 43 | !binary "RGF0ZQ==": 44 | - !binary |- 45 | TW9uLCAwMyBKdW4gMjAxMyAyMTowMDowNCBHTVQ= 46 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 47 | - !binary |- 48 | Y2h1bmtlZA== 49 | !binary "Q29udGVudC1UeXBl": 50 | - !binary |- 51 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 52 | body: 53 | encoding: ASCII-8BIT 54 | string: !binary "" 55 | http_version: 56 | recorded_at: Mon, 03 Jun 2013 21:00:04 GMT 57 | - request: 58 | method: post 59 | uri: http://10.0.5.5:4243/containers/895b4609a603/start 60 | body: 61 | encoding: US-ASCII 62 | string: '' 63 | headers: {} 64 | response: 65 | status: 66 | code: 204 67 | message: !binary |- 68 | Tm8gQ29udGVudA== 69 | headers: 70 | !binary "RGF0ZQ==": 71 | - !binary |- 72 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDozMyBHTVQ= 73 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 74 | - !binary |- 75 | Y2h1bmtlZA== 76 | !binary "Q29udGVudC1UeXBl": 77 | - !binary |- 78 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 79 | body: 80 | encoding: ASCII-8BIT 81 | string: !binary "" 82 | http_version: 83 | recorded_at: Mon, 03 Jun 2013 21:04:33 GMT 84 | - request: 85 | method: post 86 | uri: http://10.0.5.5:4243/containers/f1950c0652bf/start 87 | body: 88 | encoding: US-ASCII 89 | string: '' 90 | headers: {} 91 | response: 92 | status: 93 | code: 204 94 | message: !binary |- 95 | Tm8gQ29udGVudA== 96 | headers: 97 | !binary "RGF0ZQ==": 98 | - !binary |- 99 | TW9uLCAwMyBKdW4gMjAxMyAyMToxMDoxNCBHTVQ= 100 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 101 | - !binary |- 102 | Y2h1bmtlZA== 103 | !binary "Q29udGVudC1UeXBl": 104 | - !binary |- 105 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 106 | body: 107 | encoding: ASCII-8BIT 108 | string: !binary "" 109 | http_version: 110 | recorded_at: Mon, 03 Jun 2013 21:10:14 GMT 111 | - request: 112 | method: post 113 | uri: http://10.0.5.5:4243/containers/8d866bd7c49a/start 114 | body: 115 | encoding: US-ASCII 116 | string: '' 117 | headers: {} 118 | response: 119 | status: 120 | code: 204 121 | message: !binary |- 122 | Tm8gQ29udGVudA== 123 | headers: 124 | !binary "RGF0ZQ==": 125 | - !binary |- 126 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMTo0MyBHTVQ= 127 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 128 | - !binary |- 129 | Y2h1bmtlZA== 130 | !binary "Q29udGVudC1UeXBl": 131 | - !binary |- 132 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 133 | body: 134 | encoding: ASCII-8BIT 135 | string: !binary "" 136 | http_version: 137 | recorded_at: Mon, 03 Jun 2013 21:21:43 GMT 138 | - request: 139 | method: post 140 | uri: http://10.0.5.5:4243/containers/26511584ad6e/start 141 | body: 142 | encoding: US-ASCII 143 | string: '' 144 | headers: {} 145 | response: 146 | status: 147 | code: 204 148 | message: !binary |- 149 | Tm8gQ29udGVudA== 150 | headers: 151 | !binary "RGF0ZQ==": 152 | - !binary |- 153 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNTozMyBHTVQ= 154 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 155 | - !binary |- 156 | Y2h1bmtlZA== 157 | !binary "Q29udGVudC1UeXBl": 158 | - !binary |- 159 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 160 | body: 161 | encoding: ASCII-8BIT 162 | string: !binary "" 163 | http_version: 164 | recorded_at: Mon, 03 Jun 2013 21:25:33 GMT 165 | - request: 166 | method: post 167 | uri: http://10.0.5.5:4243/containers/9b067cf86c9f/start 168 | body: 169 | encoding: US-ASCII 170 | string: '' 171 | headers: {} 172 | response: 173 | status: 174 | code: 204 175 | message: !binary |- 176 | Tm8gQ29udGVudA== 177 | headers: 178 | !binary "RGF0ZQ==": 179 | - !binary |- 180 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNjo1NCBHTVQ= 181 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 182 | - !binary |- 183 | Y2h1bmtlZA== 184 | !binary "Q29udGVudC1UeXBl": 185 | - !binary |- 186 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 187 | body: 188 | encoding: ASCII-8BIT 189 | string: !binary "" 190 | http_version: 191 | recorded_at: Mon, 03 Jun 2013 21:26:54 GMT 192 | - request: 193 | method: post 194 | uri: http://10.0.5.5:4243/containers/5b2016d02699/start 195 | body: 196 | encoding: US-ASCII 197 | string: '' 198 | headers: {} 199 | response: 200 | status: 201 | code: 204 202 | message: !binary |- 203 | Tm8gQ29udGVudA== 204 | headers: 205 | !binary "RGF0ZQ==": 206 | - !binary |- 207 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzozMCBHTVQ= 208 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 209 | - !binary |- 210 | Y2h1bmtlZA== 211 | !binary "Q29udGVudC1UeXBl": 212 | - !binary |- 213 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 214 | body: 215 | encoding: ASCII-8BIT 216 | string: !binary "" 217 | http_version: 218 | recorded_at: Mon, 03 Jun 2013 21:37:30 GMT 219 | recorded_with: VCR 2.5.0 220 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/start/raises_an_exception_for_an_unknown_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/invalid_id/start 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzozMCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | Tm8gc3VjaCBjb250YWluZXI6IGludmFsaWRfaWQK 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:30 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/stop/halts_a_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/95fbeced7a97/stop?t=5 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 204 13 | message: !binary |- 14 | Tm8gQ29udGVudA== 15 | headers: 16 | !binary "RGF0ZQ==": 17 | - !binary |- 18 | U2F0LCAyNSBNYXkgMjAxMyAxNjowNTozMSBHTVQ= 19 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 20 | - !binary |- 21 | Y2h1bmtlZA== 22 | !binary "Q29udGVudC1UeXBl": 23 | - !binary |- 24 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary "" 28 | http_version: 29 | recorded_at: Sat, 25 May 2013 16:05:33 GMT 30 | - request: 31 | method: post 32 | uri: http://10.0.5.5:4243/containers/8eafcad28adf/stop?t=5 33 | body: 34 | encoding: US-ASCII 35 | string: '' 36 | headers: {} 37 | response: 38 | status: 39 | code: 204 40 | message: !binary |- 41 | Tm8gQ29udGVudA== 42 | headers: 43 | !binary "RGF0ZQ==": 44 | - !binary |- 45 | TW9uLCAwMyBKdW4gMjAxMyAyMDo1OTo1MyBHTVQ= 46 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 47 | - !binary |- 48 | Y2h1bmtlZA== 49 | !binary "Q29udGVudC1UeXBl": 50 | - !binary |- 51 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 52 | body: 53 | encoding: ASCII-8BIT 54 | string: !binary "" 55 | http_version: 56 | recorded_at: Mon, 03 Jun 2013 20:59:53 GMT 57 | - request: 58 | method: post 59 | uri: http://10.0.5.5:4243/containers/53bb7eda24d9/stop?t=5 60 | body: 61 | encoding: US-ASCII 62 | string: '' 63 | headers: {} 64 | response: 65 | status: 66 | code: 204 67 | message: !binary |- 68 | Tm8gQ29udGVudA== 69 | headers: 70 | !binary "RGF0ZQ==": 71 | - !binary |- 72 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDozMSBHTVQ= 73 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 74 | - !binary |- 75 | Y2h1bmtlZA== 76 | !binary "Q29udGVudC1UeXBl": 77 | - !binary |- 78 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 79 | body: 80 | encoding: ASCII-8BIT 81 | string: !binary "" 82 | http_version: 83 | recorded_at: Mon, 03 Jun 2013 21:04:31 GMT 84 | - request: 85 | method: post 86 | uri: http://10.0.5.5:4243/containers/f4d47aeeef03/stop?t=5 87 | body: 88 | encoding: US-ASCII 89 | string: '' 90 | headers: {} 91 | response: 92 | status: 93 | code: 204 94 | message: !binary |- 95 | Tm8gQ29udGVudA== 96 | headers: 97 | !binary "RGF0ZQ==": 98 | - !binary |- 99 | TW9uLCAwMyBKdW4gMjAxMyAyMTowOTo0OCBHTVQ= 100 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 101 | - !binary |- 102 | Y2h1bmtlZA== 103 | !binary "Q29udGVudC1UeXBl": 104 | - !binary |- 105 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 106 | body: 107 | encoding: ASCII-8BIT 108 | string: !binary "" 109 | http_version: 110 | recorded_at: Mon, 03 Jun 2013 21:09:48 GMT 111 | - request: 112 | method: post 113 | uri: http://10.0.5.5:4243/containers/f14f83768ce3/stop?t=5 114 | body: 115 | encoding: US-ASCII 116 | string: '' 117 | headers: {} 118 | response: 119 | status: 120 | code: 204 121 | message: !binary |- 122 | Tm8gQ29udGVudA== 123 | headers: 124 | !binary "RGF0ZQ==": 125 | - !binary |- 126 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMToxOCBHTVQ= 127 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 128 | - !binary |- 129 | Y2h1bmtlZA== 130 | !binary "Q29udGVudC1UeXBl": 131 | - !binary |- 132 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 133 | body: 134 | encoding: ASCII-8BIT 135 | string: !binary "" 136 | http_version: 137 | recorded_at: Mon, 03 Jun 2013 21:21:18 GMT 138 | - request: 139 | method: post 140 | uri: http://10.0.5.5:4243/containers/a6c14f18149a/stop?t=5 141 | body: 142 | encoding: US-ASCII 143 | string: '' 144 | headers: {} 145 | response: 146 | status: 147 | code: 204 148 | message: !binary |- 149 | Tm8gQ29udGVudA== 150 | headers: 151 | !binary "RGF0ZQ==": 152 | - !binary |- 153 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNTozMCBHTVQ= 154 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 155 | - !binary |- 156 | Y2h1bmtlZA== 157 | !binary "Q29udGVudC1UeXBl": 158 | - !binary |- 159 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 160 | body: 161 | encoding: ASCII-8BIT 162 | string: !binary "" 163 | http_version: 164 | recorded_at: Mon, 03 Jun 2013 21:25:30 GMT 165 | - request: 166 | method: post 167 | uri: http://10.0.5.5:4243/containers/14496b579347/stop?t=5 168 | body: 169 | encoding: US-ASCII 170 | string: '' 171 | headers: {} 172 | response: 173 | status: 174 | code: 204 175 | message: !binary |- 176 | Tm8gQ29udGVudA== 177 | headers: 178 | !binary "RGF0ZQ==": 179 | - !binary |- 180 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNzoxMyBHTVQ= 181 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 182 | - !binary |- 183 | Y2h1bmtlZA== 184 | !binary "Q29udGVudC1UeXBl": 185 | - !binary |- 186 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 187 | body: 188 | encoding: ASCII-8BIT 189 | string: !binary "" 190 | http_version: 191 | recorded_at: Mon, 03 Jun 2013 21:27:13 GMT 192 | - request: 193 | method: post 194 | uri: http://10.0.5.5:4243/containers/f74308ce4972/stop?t=5 195 | body: 196 | encoding: US-ASCII 197 | string: '' 198 | headers: {} 199 | response: 200 | status: 201 | code: 204 202 | message: !binary |- 203 | Tm8gQ29udGVudA== 204 | headers: 205 | !binary "RGF0ZQ==": 206 | - !binary |- 207 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoyMiBHTVQ= 208 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 209 | - !binary |- 210 | Y2h1bmtlZA== 211 | !binary "Q29udGVudC1UeXBl": 212 | - !binary |- 213 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 214 | body: 215 | encoding: ASCII-8BIT 216 | string: !binary "" 217 | http_version: 218 | recorded_at: Mon, 03 Jun 2013 21:37:22 GMT 219 | recorded_with: VCR 2.5.0 220 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/stop/raises_an_exception_for_an_unknown_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/invalid_id/stop 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoyMiBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | Tm8gc3VjaCBjb250YWluZXI6IGludmFsaWRfaWQK 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:22 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/wait/blocks_until_the_container_stops.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/499c5c8ac48a/wait 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | U2F0LCAyNSBNYXkgMjAxMyAxNjowNToyNCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | eyJTdGF0dXNDb2RlIjowfQ== 29 | http_version: 30 | recorded_at: Sat, 25 May 2013 16:05:26 GMT 31 | - request: 32 | method: post 33 | uri: http://10.0.5.5:4243/containers/94d197b24ff1/wait 34 | body: 35 | encoding: US-ASCII 36 | string: '' 37 | headers: {} 38 | response: 39 | status: 40 | code: 200 41 | message: !binary |- 42 | T0s= 43 | headers: 44 | !binary "Q29udGVudC1UeXBl": 45 | - !binary |- 46 | YXBwbGljYXRpb24vanNvbg== 47 | !binary "RGF0ZQ==": 48 | - !binary |- 49 | TW9uLCAwMyBKdW4gMjAxMyAyMTowMDowMyBHTVQ= 50 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 51 | - !binary |- 52 | Y2h1bmtlZA== 53 | body: 54 | encoding: ASCII-8BIT 55 | string: !binary |- 56 | eyJTdGF0dXNDb2RlIjowfQ== 57 | http_version: 58 | recorded_at: Mon, 03 Jun 2013 21:00:03 GMT 59 | - request: 60 | method: post 61 | uri: http://10.0.5.5:4243/containers/7a87dfa1c739/wait 62 | body: 63 | encoding: US-ASCII 64 | string: '' 65 | headers: {} 66 | response: 67 | status: 68 | code: 200 69 | message: !binary |- 70 | T0s= 71 | headers: 72 | !binary "Q29udGVudC1UeXBl": 73 | - !binary |- 74 | YXBwbGljYXRpb24vanNvbg== 75 | !binary "RGF0ZQ==": 76 | - !binary |- 77 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDoxNCBHTVQ= 78 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 79 | - !binary |- 80 | Y2h1bmtlZA== 81 | body: 82 | encoding: ASCII-8BIT 83 | string: !binary |- 84 | eyJTdGF0dXNDb2RlIjowfQ== 85 | http_version: 86 | recorded_at: Mon, 03 Jun 2013 21:04:14 GMT 87 | - request: 88 | method: post 89 | uri: http://10.0.5.5:4243/containers/20eef238da73/wait 90 | body: 91 | encoding: US-ASCII 92 | string: '' 93 | headers: {} 94 | response: 95 | status: 96 | code: 200 97 | message: !binary |- 98 | T0s= 99 | headers: 100 | !binary "Q29udGVudC1UeXBl": 101 | - !binary |- 102 | YXBwbGljYXRpb24vanNvbg== 103 | !binary "RGF0ZQ==": 104 | - !binary |- 105 | TW9uLCAwMyBKdW4gMjAxMyAyMTowOTo1OSBHTVQ= 106 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 107 | - !binary |- 108 | Y2h1bmtlZA== 109 | body: 110 | encoding: ASCII-8BIT 111 | string: !binary |- 112 | eyJTdGF0dXNDb2RlIjowfQ== 113 | http_version: 114 | recorded_at: Mon, 03 Jun 2013 21:09:59 GMT 115 | - request: 116 | method: post 117 | uri: http://10.0.5.5:4243/containers/6055961ae1c2/wait 118 | body: 119 | encoding: US-ASCII 120 | string: '' 121 | headers: {} 122 | response: 123 | status: 124 | code: 200 125 | message: !binary |- 126 | T0s= 127 | headers: 128 | !binary "Q29udGVudC1UeXBl": 129 | - !binary |- 130 | YXBwbGljYXRpb24vanNvbg== 131 | !binary "RGF0ZQ==": 132 | - !binary |- 133 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMTo0OCBHTVQ= 134 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 135 | - !binary |- 136 | Y2h1bmtlZA== 137 | body: 138 | encoding: ASCII-8BIT 139 | string: !binary |- 140 | eyJTdGF0dXNDb2RlIjowfQ== 141 | http_version: 142 | recorded_at: Mon, 03 Jun 2013 21:21:48 GMT 143 | - request: 144 | method: post 145 | uri: http://10.0.5.5:4243/containers/e5d440ced9b6/wait 146 | body: 147 | encoding: US-ASCII 148 | string: '' 149 | headers: {} 150 | response: 151 | status: 152 | code: 200 153 | message: !binary |- 154 | T0s= 155 | headers: 156 | !binary "Q29udGVudC1UeXBl": 157 | - !binary |- 158 | YXBwbGljYXRpb24vanNvbg== 159 | !binary "RGF0ZQ==": 160 | - !binary |- 161 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNjowMyBHTVQ= 162 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 163 | - !binary |- 164 | Y2h1bmtlZA== 165 | body: 166 | encoding: ASCII-8BIT 167 | string: !binary |- 168 | eyJTdGF0dXNDb2RlIjowfQ== 169 | http_version: 170 | recorded_at: Mon, 03 Jun 2013 21:26:03 GMT 171 | - request: 172 | method: post 173 | uri: http://10.0.5.5:4243/containers/6ce4822278dc/wait 174 | body: 175 | encoding: US-ASCII 176 | string: '' 177 | headers: {} 178 | response: 179 | status: 180 | code: 200 181 | message: !binary |- 182 | T0s= 183 | headers: 184 | !binary "Q29udGVudC1UeXBl": 185 | - !binary |- 186 | YXBwbGljYXRpb24vanNvbg== 187 | !binary "RGF0ZQ==": 188 | - !binary |- 189 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNzoyNCBHTVQ= 190 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 191 | - !binary |- 192 | Y2h1bmtlZA== 193 | body: 194 | encoding: ASCII-8BIT 195 | string: !binary |- 196 | eyJTdGF0dXNDb2RlIjowfQ== 197 | http_version: 198 | recorded_at: Mon, 03 Jun 2013 21:27:24 GMT 199 | - request: 200 | method: post 201 | uri: http://10.0.5.5:4243/containers/363927f645aa/wait 202 | body: 203 | encoding: US-ASCII 204 | string: '' 205 | headers: {} 206 | response: 207 | status: 208 | code: 200 209 | message: !binary |- 210 | T0s= 211 | headers: 212 | !binary "Q29udGVudC1UeXBl": 213 | - !binary |- 214 | YXBwbGljYXRpb24vanNvbg== 215 | !binary "RGF0ZQ==": 216 | - !binary |- 217 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1MCBHTVQ= 218 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 219 | - !binary |- 220 | Y2h1bmtlZA== 221 | body: 222 | encoding: ASCII-8BIT 223 | string: !binary |- 224 | eyJTdGF0dXNDb2RlIjowfQ== 225 | http_version: 226 | recorded_at: Mon, 03 Jun 2013 21:37:50 GMT 227 | recorded_with: VCR 2.5.0 228 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Container/wait/raises_an_exception_for_an_unknown_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/invalid_id/wait 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1MCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | Tm8gc3VjaCBjb250YWluZXI6IGludmFsaWRfaWQK 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:50 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Image/history/.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/images/base/history 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozODowMSBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W3siSWQiOiJiNzUwZmU3OTI2OWQiLCJDcmVhdGVkIjoxMzY0MTAyNjU4LCJD 29 | cmVhdGVkQnkiOiIvYmluL2Jhc2gifSx7IklkIjoiMjdjZjc4NDE0NzA5Iiwi 30 | Q3JlYXRlZCI6MTM2NDA2ODM5MX1d 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:38:01 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Image/history/size/.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/images/base/history 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozODowMSBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W3siSWQiOiJiNzUwZmU3OTI2OWQiLCJDcmVhdGVkIjoxMzY0MTAyNjU4LCJD 29 | cmVhdGVkQnkiOiIvYmluL2Jhc2gifSx7IklkIjoiMjdjZjc4NDE0NzA5Iiwi 30 | Q3JlYXRlZCI6MTM2NDA2ODM5MX1d 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:38:01 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Image/history/step/.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/images/base/history 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozODowMiBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W3siSWQiOiJiNzUwZmU3OTI2OWQiLCJDcmVhdGVkIjoxMzY0MTAyNjU4LCJD 29 | cmVhdGVkQnkiOiIvYmluL2Jhc2gifSx7IklkIjoiMjdjZjc4NDE0NzA5Iiwi 30 | Q3JlYXRlZCI6MTM2NDA2ODM5MX1d 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:38:02 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Image/list/.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/images/json?all=true 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1OCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W3siUmVwb3NpdG9yeSI6ImJhc2UiLCJUYWciOiJ1YnVudHUtcXVhbnRsIiwi 29 | SWQiOiJiNzUwZmU3OTI2OWQyZWM5YTNjNTkzZWYwNWI0MzMyYjFkMWEwMmE2 30 | MmI0YWNjYjJjMjFkNTg5ZmYyZjVmMmRjIiwiQ3JlYXRlZCI6MTM2NDEwMjY1 31 | OH0seyJSZXBvc2l0b3J5IjoiYmFzZSIsIlRhZyI6InVidW50dS0xMi4xMCIs 32 | IklkIjoiYjc1MGZlNzkyNjlkMmVjOWEzYzU5M2VmMDViNDMzMmIxZDFhMDJh 33 | NjJiNGFjY2IyYzIxZDU4OWZmMmY1ZjJkYyIsIkNyZWF0ZWQiOjEzNjQxMDI2 34 | NTh9LHsiUmVwb3NpdG9yeSI6ImJhc2UiLCJUYWciOiJsYXRlc3QiLCJJZCI6 35 | ImI3NTBmZTc5MjY5ZDJlYzlhM2M1OTNlZjA1YjQzMzJiMWQxYTAyYTYyYjRh 36 | Y2NiMmMyMWQ1ODlmZjJmNWYyZGMiLCJDcmVhdGVkIjoxMzY0MTAyNjU4fSx7 37 | IlJlcG9zaXRvcnkiOiJiYXNlIiwiVGFnIjoidWJ1bnR1LXF1YW50YWwiLCJJ 38 | ZCI6ImI3NTBmZTc5MjY5ZDJlYzlhM2M1OTNlZjA1YjQzMzJiMWQxYTAyYTYy 39 | YjRhY2NiMmMyMWQ1ODlmZjJmNWYyZGMiLCJDcmVhdGVkIjoxMzY0MTAyNjU4 40 | fSx7IklkIjoiMjdjZjc4NDE0NzA5OTU0NSIsIkNyZWF0ZWQiOjEzNjQwNjgz 41 | OTF9XQ== 42 | http_version: 43 | recorded_at: Mon, 03 Jun 2013 21:37:58 GMT 44 | recorded_with: VCR 2.5.0 45 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Image/list/includes_latest_base_image.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/images/json?all=true 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1OCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W3siUmVwb3NpdG9yeSI6ImJhc2UiLCJUYWciOiJ1YnVudHUtcXVhbnRsIiwi 29 | SWQiOiJiNzUwZmU3OTI2OWQyZWM5YTNjNTkzZWYwNWI0MzMyYjFkMWEwMmE2 30 | MmI0YWNjYjJjMjFkNTg5ZmYyZjVmMmRjIiwiQ3JlYXRlZCI6MTM2NDEwMjY1 31 | OH0seyJSZXBvc2l0b3J5IjoiYmFzZSIsIlRhZyI6InVidW50dS0xMi4xMCIs 32 | IklkIjoiYjc1MGZlNzkyNjlkMmVjOWEzYzU5M2VmMDViNDMzMmIxZDFhMDJh 33 | NjJiNGFjY2IyYzIxZDU4OWZmMmY1ZjJkYyIsIkNyZWF0ZWQiOjEzNjQxMDI2 34 | NTh9LHsiUmVwb3NpdG9yeSI6ImJhc2UiLCJUYWciOiJsYXRlc3QiLCJJZCI6 35 | ImI3NTBmZTc5MjY5ZDJlYzlhM2M1OTNlZjA1YjQzMzJiMWQxYTAyYTYyYjRh 36 | Y2NiMmMyMWQ1ODlmZjJmNWYyZGMiLCJDcmVhdGVkIjoxMzY0MTAyNjU4fSx7 37 | IlJlcG9zaXRvcnkiOiJiYXNlIiwiVGFnIjoidWJ1bnR1LXF1YW50YWwiLCJJ 38 | ZCI6ImI3NTBmZTc5MjY5ZDJlYzlhM2M1OTNlZjA1YjQzMzJiMWQxYTAyYTYy 39 | YjRhY2NiMmMyMWQ1ODlmZjJmNWYyZGMiLCJDcmVhdGVkIjoxMzY0MTAyNjU4 40 | fSx7IklkIjoiMjdjZjc4NDE0NzA5OTU0NSIsIkNyZWF0ZWQiOjEzNjQwNjgz 41 | OTF9XQ== 42 | http_version: 43 | recorded_at: Mon, 03 Jun 2013 21:37:58 GMT 44 | recorded_with: VCR 2.5.0 45 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Image/list/size/.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/images/json?all=true 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1OCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | W3siUmVwb3NpdG9yeSI6ImJhc2UiLCJUYWciOiJ1YnVudHUtcXVhbnRsIiwi 29 | SWQiOiJiNzUwZmU3OTI2OWQyZWM5YTNjNTkzZWYwNWI0MzMyYjFkMWEwMmE2 30 | MmI0YWNjYjJjMjFkNTg5ZmYyZjVmMmRjIiwiQ3JlYXRlZCI6MTM2NDEwMjY1 31 | OH0seyJSZXBvc2l0b3J5IjoiYmFzZSIsIlRhZyI6InVidW50dS0xMi4xMCIs 32 | IklkIjoiYjc1MGZlNzkyNjlkMmVjOWEzYzU5M2VmMDViNDMzMmIxZDFhMDJh 33 | NjJiNGFjY2IyYzIxZDU4OWZmMmY1ZjJkYyIsIkNyZWF0ZWQiOjEzNjQxMDI2 34 | NTh9LHsiUmVwb3NpdG9yeSI6ImJhc2UiLCJUYWciOiJsYXRlc3QiLCJJZCI6 35 | ImI3NTBmZTc5MjY5ZDJlYzlhM2M1OTNlZjA1YjQzMzJiMWQxYTAyYTYyYjRh 36 | Y2NiMmMyMWQ1ODlmZjJmNWYyZGMiLCJDcmVhdGVkIjoxMzY0MTAyNjU4fSx7 37 | IlJlcG9zaXRvcnkiOiJiYXNlIiwiVGFnIjoidWJ1bnR1LXF1YW50YWwiLCJJ 38 | ZCI6ImI3NTBmZTc5MjY5ZDJlYzlhM2M1OTNlZjA1YjQzMzJiMWQxYTAyYTYy 39 | YjRhY2NiMmMyMWQ1ODlmZjJmNWYyZGMiLCJDcmVhdGVkIjoxMzY0MTAyNjU4 40 | fSx7IklkIjoiMjdjZjc4NDE0NzA5OTU0NSIsIkNyZWF0ZWQiOjEzNjQwNjgz 41 | OTF9XQ== 42 | http_version: 43 | recorded_at: Mon, 03 Jun 2013 21:37:58 GMT 44 | recorded_with: VCR 2.5.0 45 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Image/remove/deletes_the_image.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: delete 5 | uri: http://10.0.5.5:4243/images/5fde55b99d53 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 204 13 | message: !binary |- 14 | Tm8gQ29udGVudA== 15 | headers: 16 | !binary "RGF0ZQ==": 17 | - !binary |- 18 | TW9uLCAwMyBKdW4gMjAxMyAyMTowMDoxNSBHTVQ= 19 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 20 | - !binary |- 21 | Y2h1bmtlZA== 22 | !binary "Q29udGVudC1UeXBl": 23 | - !binary |- 24 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary "" 28 | http_version: 29 | recorded_at: Mon, 03 Jun 2013 21:00:15 GMT 30 | - request: 31 | method: delete 32 | uri: http://10.0.5.5:4243/images/8a919d79bea6 33 | body: 34 | encoding: US-ASCII 35 | string: '' 36 | headers: {} 37 | response: 38 | status: 39 | code: 204 40 | message: !binary |- 41 | Tm8gQ29udGVudA== 42 | headers: 43 | !binary "RGF0ZQ==": 44 | - !binary |- 45 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDo0OCBHTVQ= 46 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 47 | - !binary |- 48 | Y2h1bmtlZA== 49 | !binary "Q29udGVudC1UeXBl": 50 | - !binary |- 51 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 52 | body: 53 | encoding: ASCII-8BIT 54 | string: !binary "" 55 | http_version: 56 | recorded_at: Mon, 03 Jun 2013 21:04:48 GMT 57 | - request: 58 | method: delete 59 | uri: http://10.0.5.5:4243/images/043649a011c6 60 | body: 61 | encoding: US-ASCII 62 | string: '' 63 | headers: {} 64 | response: 65 | status: 66 | code: 204 67 | message: !binary |- 68 | Tm8gQ29udGVudA== 69 | headers: 70 | !binary "RGF0ZQ==": 71 | - !binary |- 72 | TW9uLCAwMyBKdW4gMjAxMyAyMTowOTo0MCBHTVQ= 73 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 74 | - !binary |- 75 | Y2h1bmtlZA== 76 | !binary "Q29udGVudC1UeXBl": 77 | - !binary |- 78 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 79 | body: 80 | encoding: ASCII-8BIT 81 | string: !binary "" 82 | http_version: 83 | recorded_at: Mon, 03 Jun 2013 21:09:39 GMT 84 | - request: 85 | method: delete 86 | uri: http://10.0.5.5:4243/images/7a07766bd511 87 | body: 88 | encoding: US-ASCII 89 | string: '' 90 | headers: {} 91 | response: 92 | status: 93 | code: 204 94 | message: !binary |- 95 | Tm8gQ29udGVudA== 96 | headers: 97 | !binary "RGF0ZQ==": 98 | - !binary |- 99 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMTo1NCBHTVQ= 100 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 101 | - !binary |- 102 | Y2h1bmtlZA== 103 | !binary "Q29udGVudC1UeXBl": 104 | - !binary |- 105 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 106 | body: 107 | encoding: ASCII-8BIT 108 | string: !binary "" 109 | http_version: 110 | recorded_at: Mon, 03 Jun 2013 21:21:54 GMT 111 | - request: 112 | method: delete 113 | uri: http://10.0.5.5:4243/images/495a6248820c 114 | body: 115 | encoding: US-ASCII 116 | string: '' 117 | headers: {} 118 | response: 119 | status: 120 | code: 204 121 | message: !binary |- 122 | Tm8gQ29udGVudA== 123 | headers: 124 | !binary "RGF0ZQ==": 125 | - !binary |- 126 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNToxNiBHTVQ= 127 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 128 | - !binary |- 129 | Y2h1bmtlZA== 130 | !binary "Q29udGVudC1UeXBl": 131 | - !binary |- 132 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 133 | body: 134 | encoding: ASCII-8BIT 135 | string: !binary "" 136 | http_version: 137 | recorded_at: Mon, 03 Jun 2013 21:25:16 GMT 138 | - request: 139 | method: delete 140 | uri: http://10.0.5.5:4243/images/8597e246b912 141 | body: 142 | encoding: US-ASCII 143 | string: '' 144 | headers: {} 145 | response: 146 | status: 147 | code: 204 148 | message: !binary |- 149 | Tm8gQ29udGVudA== 150 | headers: 151 | !binary "RGF0ZQ==": 152 | - !binary |- 153 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNzozOSBHTVQ= 154 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 155 | - !binary |- 156 | Y2h1bmtlZA== 157 | !binary "Q29udGVudC1UeXBl": 158 | - !binary |- 159 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 160 | body: 161 | encoding: ASCII-8BIT 162 | string: !binary "" 163 | http_version: 164 | recorded_at: Mon, 03 Jun 2013 21:27:39 GMT 165 | - request: 166 | method: delete 167 | uri: http://10.0.5.5:4243/images/bfd495dad2e8 168 | body: 169 | encoding: US-ASCII 170 | string: '' 171 | headers: {} 172 | response: 173 | status: 174 | code: 204 175 | message: !binary |- 176 | Tm8gQ29udGVudA== 177 | headers: 178 | !binary "RGF0ZQ==": 179 | - !binary |- 180 | TW9uLCAwMyBKdW4gMjAxMyAyMTozODowMCBHTVQ= 181 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 182 | - !binary |- 183 | Y2h1bmtlZA== 184 | !binary "Q29udGVudC1UeXBl": 185 | - !binary |- 186 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 187 | body: 188 | encoding: ASCII-8BIT 189 | string: !binary "" 190 | http_version: 191 | recorded_at: Mon, 03 Jun 2013 21:38:00 GMT 192 | recorded_with: VCR 2.5.0 193 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Image/remove/raises_an_exception_for_an_unknown_image.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: delete 5 | uri: http://10.0.5.5:4243/images/unknown-image 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozODowMCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | Tm8gc3VjaCBpbWFnZTogdW5rbm93bi1pbWFnZQo= 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:38:00 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Image/show/.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/images/base/json 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 200 13 | message: !binary |- 14 | T0s= 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | YXBwbGljYXRpb24vanNvbg== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1OCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | eyJpZCI6ImI3NTBmZTc5MjY5ZDJlYzlhM2M1OTNlZjA1YjQzMzJiMWQxYTAy 29 | YTYyYjRhY2NiMmMyMWQ1ODlmZjJmNWYyZGMiLCJwYXJlbnQiOiIyN2NmNzg0 30 | MTQ3MDk5NTQ1IiwiY3JlYXRlZCI6IjIwMTMtMDMtMjNUMjI6MjQ6MTguODE4 31 | NDI2LTA3OjAwIiwiY29udGFpbmVyIjoiM2Q2NzI0NWE4ZDcyZWNmMTNmMzNk 32 | ZmZhYzlmNzlkY2RmNzBmNzVhY2I4NGQzMDg3NzAzOTE1MTBlMGMyM2FkMCIs 33 | ImNvbnRhaW5lcl9jb25maWciOnsiSG9zdG5hbWUiOiIiLCJVc2VyIjoiIiwi 34 | TWVtb3J5IjowLCJNZW1vcnlTd2FwIjowLCJDcHVTaGFyZXMiOjAsIkF0dGFj 35 | aFN0ZGluIjpmYWxzZSwiQXR0YWNoU3Rkb3V0IjpmYWxzZSwiQXR0YWNoU3Rk 36 | ZXJyIjpmYWxzZSwiUG9ydFNwZWNzIjpudWxsLCJUdHkiOnRydWUsIk9wZW5T 37 | dGRpbiI6dHJ1ZSwiU3RkaW5PbmNlIjpmYWxzZSwiRW52IjpudWxsLCJDbWQi 38 | OlsiL2Jpbi9iYXNoIl0sIkRucyI6bnVsbCwiSW1hZ2UiOiJiYXNlIiwiVm9s 39 | dW1lcyI6bnVsbCwiVm9sdW1lc0Zyb20iOiIifX0= 40 | http_version: 41 | recorded_at: Mon, 03 Jun 2013 21:37:58 GMT 42 | recorded_with: VCR 2.5.0 43 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Image/show/raises_an_exception_for_an_unknown_image.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: http://10.0.5.5:4243/images/invalid_image/json 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 404 13 | message: !binary |- 14 | Tm90IEZvdW5k 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1OCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | Tm8gc3VjaCBpbWFnZTogaW52YWxpZF9pbWFnZQo= 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:37:58 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Image/tag/an_image_into_a_repository.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/images/test-tag/tag?repo=test-repo 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 201 13 | message: !binary |- 14 | Q3JlYXRlZA== 15 | headers: 16 | !binary "RGF0ZQ==": 17 | - !binary |- 18 | TW9uLCAwMyBKdW4gMjAxMyAyMTozODowMSBHTVQ= 19 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 20 | - !binary |- 21 | Y2h1bmtlZA== 22 | !binary "Q29udGVudC1UeXBl": 23 | - !binary |- 24 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary "" 28 | http_version: 29 | recorded_at: Mon, 03 Jun 2013 21:38:01 GMT 30 | recorded_with: VCR 2.5.0 31 | -------------------------------------------------------------------------------- /spec/cassettes/Docker_Resource_Image/tag/raises_an_exception_for_an_unknown_image.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/images/inavlid_image/tag?repo=test-repo 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: {} 10 | response: 11 | status: 12 | code: 500 13 | message: !binary |- 14 | SW50ZXJuYWwgU2VydmVyIEVycm9y 15 | headers: 16 | !binary "Q29udGVudC1UeXBl": 17 | - !binary |- 18 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozODowMSBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | body: 26 | encoding: ASCII-8BIT 27 | string: !binary |- 28 | SW1hZ2UgZG9lcyBub3QgZXhpc3Q6IGluYXZsaWRfaW1hZ2UK 29 | http_version: 30 | recorded_at: Mon, 03 Jun 2013 21:38:01 GMT 31 | recorded_with: VCR 2.5.0 32 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/commit_container.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/commit?container=c428968a78b6&repo=test-image 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTowMDoxNSBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6IjVmZGU1NWI5OWQ1MyJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:00:15 GMT 33 | - request: 34 | method: post 35 | uri: http://10.0.5.5:4243/commit?container=17f43281496e&repo=test-tag 36 | body: 37 | encoding: US-ASCII 38 | string: '' 39 | headers: 40 | Content-Type: 41 | - application/json 42 | response: 43 | status: 44 | code: 201 45 | message: !binary |- 46 | Q3JlYXRlZA== 47 | headers: 48 | !binary "RGF0ZQ==": 49 | - !binary |- 50 | TW9uLCAwMyBKdW4gMjAxMyAyMTowMDoxNyBHTVQ= 51 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 52 | - !binary |- 53 | Y2h1bmtlZA== 54 | !binary "Q29udGVudC1UeXBl": 55 | - !binary |- 56 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 57 | body: 58 | encoding: ASCII-8BIT 59 | string: !binary |- 60 | eyJJZCI6IjdhZmU5OWIyNjZiMiJ9 61 | http_version: 62 | recorded_at: Mon, 03 Jun 2013 21:00:17 GMT 63 | - request: 64 | method: post 65 | uri: http://10.0.5.5:4243/commit?container=ee4d3a14d3c6&repo=test-tag 66 | body: 67 | encoding: US-ASCII 68 | string: '' 69 | headers: 70 | Content-Type: 71 | - application/json 72 | response: 73 | status: 74 | code: 201 75 | message: !binary |- 76 | Q3JlYXRlZA== 77 | headers: 78 | !binary "RGF0ZQ==": 79 | - !binary |- 80 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDo0NiBHTVQ= 81 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 82 | - !binary |- 83 | Y2h1bmtlZA== 84 | !binary "Q29udGVudC1UeXBl": 85 | - !binary |- 86 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 87 | body: 88 | encoding: ASCII-8BIT 89 | string: !binary |- 90 | eyJJZCI6Ijk3Mzk1OTgyNmRkMCJ9 91 | http_version: 92 | recorded_at: Mon, 03 Jun 2013 21:04:46 GMT 93 | - request: 94 | method: post 95 | uri: http://10.0.5.5:4243/commit?container=286af8bb0142&repo=test-image 96 | body: 97 | encoding: US-ASCII 98 | string: '' 99 | headers: 100 | Content-Type: 101 | - application/json 102 | response: 103 | status: 104 | code: 201 105 | message: !binary |- 106 | Q3JlYXRlZA== 107 | headers: 108 | !binary "RGF0ZQ==": 109 | - !binary |- 110 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDo0OCBHTVQ= 111 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 112 | - !binary |- 113 | Y2h1bmtlZA== 114 | !binary "Q29udGVudC1UeXBl": 115 | - !binary |- 116 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 117 | body: 118 | encoding: ASCII-8BIT 119 | string: !binary |- 120 | eyJJZCI6IjhhOTE5ZDc5YmVhNiJ9 121 | http_version: 122 | recorded_at: Mon, 03 Jun 2013 21:04:48 GMT 123 | - request: 124 | method: post 125 | uri: http://10.0.5.5:4243/commit?container=093fe0394dd6&repo=test-image 126 | body: 127 | encoding: US-ASCII 128 | string: '' 129 | headers: 130 | Content-Type: 131 | - application/json 132 | response: 133 | status: 134 | code: 201 135 | message: !binary |- 136 | Q3JlYXRlZA== 137 | headers: 138 | !binary "RGF0ZQ==": 139 | - !binary |- 140 | TW9uLCAwMyBKdW4gMjAxMyAyMTowOTozOSBHTVQ= 141 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 142 | - !binary |- 143 | Y2h1bmtlZA== 144 | !binary "Q29udGVudC1UeXBl": 145 | - !binary |- 146 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 147 | body: 148 | encoding: ASCII-8BIT 149 | string: !binary |- 150 | eyJJZCI6IjA0MzY0OWEwMTFjNiJ9 151 | http_version: 152 | recorded_at: Mon, 03 Jun 2013 21:09:39 GMT 153 | - request: 154 | method: post 155 | uri: http://10.0.5.5:4243/commit?container=ec87272f088a&repo=test-tag 156 | body: 157 | encoding: US-ASCII 158 | string: '' 159 | headers: 160 | Content-Type: 161 | - application/json 162 | response: 163 | status: 164 | code: 201 165 | message: !binary |- 166 | Q3JlYXRlZA== 167 | headers: 168 | !binary "RGF0ZQ==": 169 | - !binary |- 170 | TW9uLCAwMyBKdW4gMjAxMyAyMTowOTo0MSBHTVQ= 171 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 172 | - !binary |- 173 | Y2h1bmtlZA== 174 | !binary "Q29udGVudC1UeXBl": 175 | - !binary |- 176 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 177 | body: 178 | encoding: ASCII-8BIT 179 | string: !binary |- 180 | eyJJZCI6ImMzM2RhYjg0ZmU2ZCJ9 181 | http_version: 182 | recorded_at: Mon, 03 Jun 2013 21:09:41 GMT 183 | - request: 184 | method: post 185 | uri: http://10.0.5.5:4243/commit?container=2da45de592e1&repo=test-image 186 | body: 187 | encoding: US-ASCII 188 | string: '' 189 | headers: 190 | Content-Type: 191 | - application/json 192 | response: 193 | status: 194 | code: 201 195 | message: !binary |- 196 | Q3JlYXRlZA== 197 | headers: 198 | !binary "RGF0ZQ==": 199 | - !binary |- 200 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMTo1NCBHTVQ= 201 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 202 | - !binary |- 203 | Y2h1bmtlZA== 204 | !binary "Q29udGVudC1UeXBl": 205 | - !binary |- 206 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 207 | body: 208 | encoding: ASCII-8BIT 209 | string: !binary |- 210 | eyJJZCI6IjdhMDc3NjZiZDUxMSJ9 211 | http_version: 212 | recorded_at: Mon, 03 Jun 2013 21:21:54 GMT 213 | - request: 214 | method: post 215 | uri: http://10.0.5.5:4243/commit?container=9255ab6e2053&repo=test-tag 216 | body: 217 | encoding: US-ASCII 218 | string: '' 219 | headers: 220 | Content-Type: 221 | - application/json 222 | response: 223 | status: 224 | code: 201 225 | message: !binary |- 226 | Q3JlYXRlZA== 227 | headers: 228 | !binary "RGF0ZQ==": 229 | - !binary |- 230 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMTo1NiBHTVQ= 231 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 232 | - !binary |- 233 | Y2h1bmtlZA== 234 | !binary "Q29udGVudC1UeXBl": 235 | - !binary |- 236 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 237 | body: 238 | encoding: ASCII-8BIT 239 | string: !binary |- 240 | eyJJZCI6ImE1ZDI2ZmEzOWQyOSJ9 241 | http_version: 242 | recorded_at: Mon, 03 Jun 2013 21:21:56 GMT 243 | - request: 244 | method: post 245 | uri: http://10.0.5.5:4243/commit?container=028844c8efcd&repo=test-tag 246 | body: 247 | encoding: US-ASCII 248 | string: '' 249 | headers: 250 | Content-Type: 251 | - application/json 252 | response: 253 | status: 254 | code: 201 255 | message: !binary |- 256 | Q3JlYXRlZA== 257 | headers: 258 | !binary "RGF0ZQ==": 259 | - !binary |- 260 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNToxNCBHTVQ= 261 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 262 | - !binary |- 263 | Y2h1bmtlZA== 264 | !binary "Q29udGVudC1UeXBl": 265 | - !binary |- 266 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 267 | body: 268 | encoding: ASCII-8BIT 269 | string: !binary |- 270 | eyJJZCI6ImM5NTE3ZjI2ODA0ZSJ9 271 | http_version: 272 | recorded_at: Mon, 03 Jun 2013 21:25:14 GMT 273 | - request: 274 | method: post 275 | uri: http://10.0.5.5:4243/commit?container=d6d46b79024e&repo=test-image 276 | body: 277 | encoding: US-ASCII 278 | string: '' 279 | headers: 280 | Content-Type: 281 | - application/json 282 | response: 283 | status: 284 | code: 201 285 | message: !binary |- 286 | Q3JlYXRlZA== 287 | headers: 288 | !binary "RGF0ZQ==": 289 | - !binary |- 290 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNToxNiBHTVQ= 291 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 292 | - !binary |- 293 | Y2h1bmtlZA== 294 | !binary "Q29udGVudC1UeXBl": 295 | - !binary |- 296 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 297 | body: 298 | encoding: ASCII-8BIT 299 | string: !binary |- 300 | eyJJZCI6IjQ5NWE2MjQ4ODIwYyJ9 301 | http_version: 302 | recorded_at: Mon, 03 Jun 2013 21:25:16 GMT 303 | - request: 304 | method: post 305 | uri: http://10.0.5.5:4243/commit?container=dba4b0ef108f&repo=test-image 306 | body: 307 | encoding: US-ASCII 308 | string: '' 309 | headers: 310 | Content-Type: 311 | - application/json 312 | response: 313 | status: 314 | code: 201 315 | message: !binary |- 316 | Q3JlYXRlZA== 317 | headers: 318 | !binary "RGF0ZQ==": 319 | - !binary |- 320 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNzozOSBHTVQ= 321 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 322 | - !binary |- 323 | Y2h1bmtlZA== 324 | !binary "Q29udGVudC1UeXBl": 325 | - !binary |- 326 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 327 | body: 328 | encoding: ASCII-8BIT 329 | string: !binary |- 330 | eyJJZCI6Ijg1OTdlMjQ2YjkxMiJ9 331 | http_version: 332 | recorded_at: Mon, 03 Jun 2013 21:27:39 GMT 333 | - request: 334 | method: post 335 | uri: http://10.0.5.5:4243/commit?container=be7774cf7e5f&repo=test-tag 336 | body: 337 | encoding: US-ASCII 338 | string: '' 339 | headers: 340 | Content-Type: 341 | - application/json 342 | response: 343 | status: 344 | code: 201 345 | message: !binary |- 346 | Q3JlYXRlZA== 347 | headers: 348 | !binary "RGF0ZQ==": 349 | - !binary |- 350 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNzo0MSBHTVQ= 351 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 352 | - !binary |- 353 | Y2h1bmtlZA== 354 | !binary "Q29udGVudC1UeXBl": 355 | - !binary |- 356 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 357 | body: 358 | encoding: ASCII-8BIT 359 | string: !binary |- 360 | eyJJZCI6ImI4NzE0NmVhNzVjNSJ9 361 | http_version: 362 | recorded_at: Mon, 03 Jun 2013 21:27:41 GMT 363 | - request: 364 | method: post 365 | uri: http://10.0.5.5:4243/commit?container=7ae604530e7b&repo=test-image 366 | body: 367 | encoding: US-ASCII 368 | string: '' 369 | headers: 370 | Content-Type: 371 | - application/json 372 | response: 373 | status: 374 | code: 201 375 | message: !binary |- 376 | Q3JlYXRlZA== 377 | headers: 378 | !binary "RGF0ZQ==": 379 | - !binary |- 380 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1OSBHTVQ= 381 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 382 | - !binary |- 383 | Y2h1bmtlZA== 384 | !binary "Q29udGVudC1UeXBl": 385 | - !binary |- 386 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 387 | body: 388 | encoding: ASCII-8BIT 389 | string: !binary |- 390 | eyJJZCI6ImJmZDQ5NWRhZDJlOCJ9 391 | http_version: 392 | recorded_at: Mon, 03 Jun 2013 21:37:59 GMT 393 | - request: 394 | method: post 395 | uri: http://10.0.5.5:4243/commit?container=a376c65b71c3&repo=test-tag 396 | body: 397 | encoding: US-ASCII 398 | string: '' 399 | headers: 400 | Content-Type: 401 | - application/json 402 | response: 403 | status: 404 | code: 201 405 | message: !binary |- 406 | Q3JlYXRlZA== 407 | headers: 408 | !binary "RGF0ZQ==": 409 | - !binary |- 410 | TW9uLCAwMyBKdW4gMjAxMyAyMTozODowMSBHTVQ= 411 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 412 | - !binary |- 413 | Y2h1bmtlZA== 414 | !binary "Q29udGVudC1UeXBl": 415 | - !binary |- 416 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 417 | body: 418 | encoding: ASCII-8BIT 419 | string: !binary |- 420 | eyJJZCI6ImU3NDAyYmQ2MTkwNyJ9 421 | http_version: 422 | recorded_at: Mon, 03 Jun 2013 21:38:01 GMT 423 | recorded_with: VCR 2.5.0 424 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container__command_/bin/sh_-c_while_true_do_echo_hello_world_sleep_1_done_.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["env"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMToxOToyNCBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6IjZjZTBhYTZmYjhhNiJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:19:24 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_connection_post.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["env"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1NiBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6ImNhZmQ3NzUwY2QzMCJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:37:56 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_attach.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["/bin/sh","-c","while true; do echo hello world; sleep 1; 9 | done"],"Image":"base"}' 10 | headers: 11 | Content-Type: 12 | - application/json 13 | response: 14 | status: 15 | code: 201 16 | message: !binary |- 17 | Q3JlYXRlZA== 18 | headers: 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoyMyBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | !binary "Q29udGVudC1UeXBl": 26 | - !binary |- 27 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 28 | body: 29 | encoding: ASCII-8BIT 30 | string: !binary |- 31 | eyJJZCI6ImI3ZmQ1NWY1MzM4YSJ9 32 | http_version: 33 | recorded_at: Mon, 03 Jun 2013 21:37:23 GMT 34 | recorded_with: VCR 2.5.0 35 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_changes.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["touch","/tmp/changes"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzozMSBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6ImM5MTgyNzAwMjdlMyJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:37:31 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_commit.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["touch","/tmp/changes"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo0MiBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6IjA1NDQzMGRjMDk3ZCJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:37:42 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_kill.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["/bin/sh","-c","while true; do echo hello world; sleep 1; 9 | done"],"Image":"base"}' 10 | headers: 11 | Content-Type: 12 | - application/json 13 | response: 14 | status: 15 | code: 201 16 | message: !binary |- 17 | Q3JlYXRlZA== 18 | headers: 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo0MSBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | !binary "Q29udGVudC1UeXBl": 26 | - !binary |- 27 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 28 | body: 29 | encoding: ASCII-8BIT 30 | string: !binary |- 31 | eyJJZCI6IjEyODEwZjc1MzhlNCJ9 32 | http_version: 33 | recorded_at: Mon, 03 Jun 2013 21:37:41 GMT 34 | recorded_with: VCR 2.5.0 35 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_lists1.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["/bin/sh","-c","while true; do echo hello world; sleep 1; 9 | done"],"Image":"base"}' 10 | headers: 11 | Content-Type: 12 | - application/json 13 | response: 14 | status: 15 | code: 201 16 | message: !binary |- 17 | Q3JlYXRlZA== 18 | headers: 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoxNSBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | !binary "Q29udGVudC1UeXBl": 26 | - !binary |- 27 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 28 | body: 29 | encoding: ASCII-8BIT 30 | string: !binary |- 31 | eyJJZCI6ImFhZjU2MGRiZWRlOSJ9 32 | http_version: 33 | recorded_at: Mon, 03 Jun 2013 21:37:15 GMT 34 | recorded_with: VCR 2.5.0 35 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_lists2.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["env"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoxNiBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6IjI4NjcwY2ZlYTRlYyJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:37:16 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_logs.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["/bin/sh","-c","echo stdout; echo stderr 1>&2"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo0NCBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6IjdmZTI0OWFmOTU5NSJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:37:44 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_remove.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Volumes":{"/var/lib/app":{}},"Cmd":["env"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1MCBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6ImU4ODRlNzMwNmM1OCJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:37:50 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_restarts.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["/bin/sh","-c","while true; do echo hello world; sleep 1; 9 | done"],"Image":"base"}' 10 | headers: 11 | Content-Type: 12 | - application/json 13 | response: 14 | status: 15 | code: 201 16 | message: !binary |- 17 | Q3JlYXRlZA== 18 | headers: 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzozMyBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | !binary "Q29udGVudC1UeXBl": 26 | - !binary |- 27 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 28 | body: 29 | encoding: ASCII-8BIT 30 | string: !binary |- 31 | eyJJZCI6ImVjMTg0ZjkxZTFiNyJ9 32 | http_version: 33 | recorded_at: Mon, 03 Jun 2013 21:37:33 GMT 34 | recorded_with: VCR 2.5.0 35 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_shows.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["env"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo0MCBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6ImI0ZTZiOGQ2NjgwMCJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:37:40 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_start.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["env"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzozMCBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6IjViMjAxNmQwMjY5OSJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:37:30 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_stop.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["/bin/sh","-c","while true; do echo hello world; sleep 1; 9 | done"],"Image":"base"}' 10 | headers: 11 | Content-Type: 12 | - application/json 13 | response: 14 | status: 15 | code: 201 16 | message: !binary |- 17 | Q3JlYXRlZA== 18 | headers: 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzoxNyBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | !binary "Q29udGVudC1UeXBl": 26 | - !binary |- 27 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 28 | body: 29 | encoding: ASCII-8BIT 30 | string: !binary |- 31 | eyJJZCI6ImY3NDMwOGNlNDk3MiJ9 32 | http_version: 33 | recorded_at: Mon, 03 Jun 2013 21:37:17 GMT 34 | recorded_with: VCR 2.5.0 35 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_container_wait.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["sleep","3"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo0NSBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6IjM2MzkyN2Y2NDVhYSJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:37:45 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_test-image.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"commit":true,"Cmd":["touch","/tmp/changes"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1OCBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6IjdhZTYwNDUzMGU3YiJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:37:58 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_test-returns-a-stream.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"Cmd":["/bin/sh","-c","while true; do echo hello world; sleep 1; 9 | done"],"Image":"base"}' 10 | headers: 11 | Content-Type: 12 | - application/json 13 | response: 14 | status: 15 | code: 201 16 | message: !binary |- 17 | Q3JlYXRlZA== 18 | headers: 19 | !binary "RGF0ZQ==": 20 | - !binary |- 21 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo1MCBHTVQ= 22 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 23 | - !binary |- 24 | Y2h1bmtlZA== 25 | !binary "Q29udGVudC1UeXBl": 26 | - !binary |- 27 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 28 | body: 29 | encoding: ASCII-8BIT 30 | string: !binary |- 31 | eyJJZCI6ImMyN2VhOWIxMWRhOSJ9 32 | http_version: 33 | recorded_at: Mon, 03 Jun 2013 21:37:50 GMT 34 | recorded_with: VCR 2.5.0 35 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/create_container_test-tag.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: http://10.0.5.5:4243/containers/create 6 | body: 7 | encoding: UTF-8 8 | string: ! '{"commit":true,"Cmd":["touch","/tmp/changes"],"Image":"base"}' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 201 15 | message: !binary |- 16 | Q3JlYXRlZA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTozODowMCBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary |- 30 | eyJJZCI6ImEzNzZjNjViNzFjMyJ9 31 | http_version: 32 | recorded_at: Mon, 03 Jun 2013 21:38:00 GMT 33 | recorded_with: VCR 2.5.0 34 | -------------------------------------------------------------------------------- /spec/cassettes/test_setup/delete_image.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: delete 5 | uri: http://10.0.5.5:4243/images/02cd17f0a784 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Content-Type: 11 | - application/json 12 | response: 13 | status: 14 | code: 204 15 | message: !binary |- 16 | Tm8gQ29udGVudA== 17 | headers: 18 | !binary "RGF0ZQ==": 19 | - !binary |- 20 | TW9uLCAwMyBKdW4gMjAxMyAyMTowMDowOSBHTVQ= 21 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 22 | - !binary |- 23 | Y2h1bmtlZA== 24 | !binary "Q29udGVudC1UeXBl": 25 | - !binary |- 26 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 27 | body: 28 | encoding: ASCII-8BIT 29 | string: !binary "" 30 | http_version: 31 | recorded_at: Mon, 03 Jun 2013 21:00:09 GMT 32 | - request: 33 | method: delete 34 | uri: http://10.0.5.5:4243/images/7afe99b266b2 35 | body: 36 | encoding: US-ASCII 37 | string: '' 38 | headers: 39 | Content-Type: 40 | - application/json 41 | response: 42 | status: 43 | code: 204 44 | message: !binary |- 45 | Tm8gQ29udGVudA== 46 | headers: 47 | !binary "RGF0ZQ==": 48 | - !binary |- 49 | TW9uLCAwMyBKdW4gMjAxMyAyMTowMDoxOCBHTVQ= 50 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 51 | - !binary |- 52 | Y2h1bmtlZA== 53 | !binary "Q29udGVudC1UeXBl": 54 | - !binary |- 55 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 56 | body: 57 | encoding: ASCII-8BIT 58 | string: !binary "" 59 | http_version: 60 | recorded_at: Mon, 03 Jun 2013 21:00:18 GMT 61 | - request: 62 | method: delete 63 | uri: http://10.0.5.5:4243/images/d0f68488f661 64 | body: 65 | encoding: US-ASCII 66 | string: '' 67 | headers: 68 | Content-Type: 69 | - application/json 70 | response: 71 | status: 72 | code: 204 73 | message: !binary |- 74 | Tm8gQ29udGVudA== 75 | headers: 76 | !binary "RGF0ZQ==": 77 | - !binary |- 78 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDoyMCBHTVQ= 79 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 80 | - !binary |- 81 | Y2h1bmtlZA== 82 | !binary "Q29udGVudC1UeXBl": 83 | - !binary |- 84 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 85 | body: 86 | encoding: ASCII-8BIT 87 | string: !binary "" 88 | http_version: 89 | recorded_at: Mon, 03 Jun 2013 21:04:20 GMT 90 | - request: 91 | method: delete 92 | uri: http://10.0.5.5:4243/images/973959826dd0 93 | body: 94 | encoding: US-ASCII 95 | string: '' 96 | headers: 97 | Content-Type: 98 | - application/json 99 | response: 100 | status: 101 | code: 204 102 | message: !binary |- 103 | Tm8gQ29udGVudA== 104 | headers: 105 | !binary "RGF0ZQ==": 106 | - !binary |- 107 | TW9uLCAwMyBKdW4gMjAxMyAyMTowNDo0NyBHTVQ= 108 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 109 | - !binary |- 110 | Y2h1bmtlZA== 111 | !binary "Q29udGVudC1UeXBl": 112 | - !binary |- 113 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 114 | body: 115 | encoding: ASCII-8BIT 116 | string: !binary "" 117 | http_version: 118 | recorded_at: Mon, 03 Jun 2013 21:04:46 GMT 119 | - request: 120 | method: delete 121 | uri: http://10.0.5.5:4243/images/c33dab84fe6d 122 | body: 123 | encoding: US-ASCII 124 | string: '' 125 | headers: 126 | Content-Type: 127 | - application/json 128 | response: 129 | status: 130 | code: 204 131 | message: !binary |- 132 | Tm8gQ29udGVudA== 133 | headers: 134 | !binary "RGF0ZQ==": 135 | - !binary |- 136 | TW9uLCAwMyBKdW4gMjAxMyAyMTowOTo0MSBHTVQ= 137 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 138 | - !binary |- 139 | Y2h1bmtlZA== 140 | !binary "Q29udGVudC1UeXBl": 141 | - !binary |- 142 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 143 | body: 144 | encoding: ASCII-8BIT 145 | string: !binary "" 146 | http_version: 147 | recorded_at: Mon, 03 Jun 2013 21:09:41 GMT 148 | - request: 149 | method: delete 150 | uri: http://10.0.5.5:4243/images/35e5c8f3eec7 151 | body: 152 | encoding: US-ASCII 153 | string: '' 154 | headers: 155 | Content-Type: 156 | - application/json 157 | response: 158 | status: 159 | code: 204 160 | message: !binary |- 161 | Tm8gQ29udGVudA== 162 | headers: 163 | !binary "RGF0ZQ==": 164 | - !binary |- 165 | TW9uLCAwMyBKdW4gMjAxMyAyMToxMDowNSBHTVQ= 166 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 167 | - !binary |- 168 | Y2h1bmtlZA== 169 | !binary "Q29udGVudC1UeXBl": 170 | - !binary |- 171 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 172 | body: 173 | encoding: ASCII-8BIT 174 | string: !binary "" 175 | http_version: 176 | recorded_at: Mon, 03 Jun 2013 21:10:05 GMT 177 | - request: 178 | method: delete 179 | uri: http://10.0.5.5:4243/images/a3451e368c96 180 | body: 181 | encoding: US-ASCII 182 | string: '' 183 | headers: 184 | Content-Type: 185 | - application/json 186 | response: 187 | status: 188 | code: 204 189 | message: !binary |- 190 | Tm8gQ29udGVudA== 191 | headers: 192 | !binary "RGF0ZQ==": 193 | - !binary |- 194 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMTozOCBHTVQ= 195 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 196 | - !binary |- 197 | Y2h1bmtlZA== 198 | !binary "Q29udGVudC1UeXBl": 199 | - !binary |- 200 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 201 | body: 202 | encoding: ASCII-8BIT 203 | string: !binary "" 204 | http_version: 205 | recorded_at: Mon, 03 Jun 2013 21:21:38 GMT 206 | - request: 207 | method: delete 208 | uri: http://10.0.5.5:4243/images/a5d26fa39d29 209 | body: 210 | encoding: US-ASCII 211 | string: '' 212 | headers: 213 | Content-Type: 214 | - application/json 215 | response: 216 | status: 217 | code: 204 218 | message: !binary |- 219 | Tm8gQ29udGVudA== 220 | headers: 221 | !binary "RGF0ZQ==": 222 | - !binary |- 223 | TW9uLCAwMyBKdW4gMjAxMyAyMToyMTo1NiBHTVQ= 224 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 225 | - !binary |- 226 | Y2h1bmtlZA== 227 | !binary "Q29udGVudC1UeXBl": 228 | - !binary |- 229 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 230 | body: 231 | encoding: ASCII-8BIT 232 | string: !binary "" 233 | http_version: 234 | recorded_at: Mon, 03 Jun 2013 21:21:56 GMT 235 | - request: 236 | method: delete 237 | uri: http://10.0.5.5:4243/images/c9517f26804e 238 | body: 239 | encoding: US-ASCII 240 | string: '' 241 | headers: 242 | Content-Type: 243 | - application/json 244 | response: 245 | status: 246 | code: 204 247 | message: !binary |- 248 | Tm8gQ29udGVudA== 249 | headers: 250 | !binary "RGF0ZQ==": 251 | - !binary |- 252 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNToxNCBHTVQ= 253 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 254 | - !binary |- 255 | Y2h1bmtlZA== 256 | !binary "Q29udGVudC1UeXBl": 257 | - !binary |- 258 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 259 | body: 260 | encoding: ASCII-8BIT 261 | string: !binary "" 262 | http_version: 263 | recorded_at: Mon, 03 Jun 2013 21:25:14 GMT 264 | - request: 265 | method: delete 266 | uri: http://10.0.5.5:4243/images/384cc71f75f5 267 | body: 268 | encoding: US-ASCII 269 | string: '' 270 | headers: 271 | Content-Type: 272 | - application/json 273 | response: 274 | status: 275 | code: 204 276 | message: !binary |- 277 | Tm8gQ29udGVudA== 278 | headers: 279 | !binary "RGF0ZQ==": 280 | - !binary |- 281 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNTozMiBHTVQ= 282 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 283 | - !binary |- 284 | Y2h1bmtlZA== 285 | !binary "Q29udGVudC1UeXBl": 286 | - !binary |- 287 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 288 | body: 289 | encoding: ASCII-8BIT 290 | string: !binary "" 291 | http_version: 292 | recorded_at: Mon, 03 Jun 2013 21:25:32 GMT 293 | - request: 294 | method: delete 295 | uri: http://10.0.5.5:4243/images/2a72fd890c03 296 | body: 297 | encoding: US-ASCII 298 | string: '' 299 | headers: 300 | Content-Type: 301 | - application/json 302 | response: 303 | status: 304 | code: 204 305 | message: !binary |- 306 | Tm8gQ29udGVudA== 307 | headers: 308 | !binary "RGF0ZQ==": 309 | - !binary |- 310 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNjo1MSBHTVQ= 311 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 312 | - !binary |- 313 | Y2h1bmtlZA== 314 | !binary "Q29udGVudC1UeXBl": 315 | - !binary |- 316 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 317 | body: 318 | encoding: ASCII-8BIT 319 | string: !binary "" 320 | http_version: 321 | recorded_at: Mon, 03 Jun 2013 21:26:51 GMT 322 | - request: 323 | method: delete 324 | uri: http://10.0.5.5:4243/images/b87146ea75c5 325 | body: 326 | encoding: US-ASCII 327 | string: '' 328 | headers: 329 | Content-Type: 330 | - application/json 331 | response: 332 | status: 333 | code: 204 334 | message: !binary |- 335 | Tm8gQ29udGVudA== 336 | headers: 337 | !binary "RGF0ZQ==": 338 | - !binary |- 339 | TW9uLCAwMyBKdW4gMjAxMyAyMToyNzo0MiBHTVQ= 340 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 341 | - !binary |- 342 | Y2h1bmtlZA== 343 | !binary "Q29udGVudC1UeXBl": 344 | - !binary |- 345 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 346 | body: 347 | encoding: ASCII-8BIT 348 | string: !binary "" 349 | http_version: 350 | recorded_at: Mon, 03 Jun 2013 21:27:42 GMT 351 | - request: 352 | method: delete 353 | uri: http://10.0.5.5:4243/images/6b30f5966cf7 354 | body: 355 | encoding: US-ASCII 356 | string: '' 357 | headers: 358 | Content-Type: 359 | - application/json 360 | response: 361 | status: 362 | code: 204 363 | message: !binary |- 364 | Tm8gQ29udGVudA== 365 | headers: 366 | !binary "RGF0ZQ==": 367 | - !binary |- 368 | TW9uLCAwMyBKdW4gMjAxMyAyMTozNzo0MyBHTVQ= 369 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 370 | - !binary |- 371 | Y2h1bmtlZA== 372 | !binary "Q29udGVudC1UeXBl": 373 | - !binary |- 374 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 375 | body: 376 | encoding: ASCII-8BIT 377 | string: !binary "" 378 | http_version: 379 | recorded_at: Mon, 03 Jun 2013 21:37:43 GMT 380 | - request: 381 | method: delete 382 | uri: http://10.0.5.5:4243/images/e7402bd61907 383 | body: 384 | encoding: US-ASCII 385 | string: '' 386 | headers: 387 | Content-Type: 388 | - application/json 389 | response: 390 | status: 391 | code: 204 392 | message: !binary |- 393 | Tm8gQ29udGVudA== 394 | headers: 395 | !binary "RGF0ZQ==": 396 | - !binary |- 397 | TW9uLCAwMyBKdW4gMjAxMyAyMTozODowMSBHTVQ= 398 | !binary "VHJhbnNmZXItRW5jb2Rpbmc=": 399 | - !binary |- 400 | Y2h1bmtlZA== 401 | !binary "Q29udGVudC1UeXBl": 402 | - !binary |- 403 | dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA== 404 | body: 405 | encoding: ASCII-8BIT 406 | string: !binary "" 407 | http_version: 408 | recorded_at: Mon, 03 Jun 2013 21:38:01 GMT 409 | recorded_with: VCR 2.5.0 410 | -------------------------------------------------------------------------------- /spec/docker/api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe Docker::API do 4 | subject { Docker::API.new(base_url: 'http://10.0.5.5:4243') } 5 | 6 | it "provides a container resource" do 7 | subject.containers.should be_kind_of(Docker::Resource::Container) 8 | end 9 | 10 | it "provides an image resource" do 11 | subject.images.should be_kind_of(Docker::Resource::Image) 12 | end 13 | 14 | xit "provides a system resource" do 15 | 16 | end 17 | 18 | xit "provides a misc resource" do 19 | 20 | end 21 | 22 | it "sets up a connection object" do 23 | subject.connection.should_not be_nil 24 | subject.connection.should be_kind_of(Docker::Connection) 25 | end 26 | 27 | it "throws an error without a base_url configured" do 28 | expect { 29 | Docker::API.new({}) 30 | }.to raise_error(ArgumentError, ':base_url missing') 31 | end 32 | 33 | 34 | # Alternative syntax 35 | # "Hello".should == 'Hello' 36 | # expect("Hello").to eq("Hello") 37 | end -------------------------------------------------------------------------------- /spec/docker/connection_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe Docker::Connection, :vcr do 4 | subject { Docker::Connection.new(base_url: 'http://10.0.5.5:4243') } 5 | 6 | it "throws an error without a base_url configured" do 7 | expect { 8 | Docker::Connection.new({}) 9 | }.to raise_error(ArgumentError, ':base_url missing') 10 | end 11 | 12 | it "sets given request headers" do 13 | subject.get('/pseudo_request', {}, {'Content-Type' => 'application/json'}) 14 | WebMock.should have_requested(:get, "10.0.5.5:4243/pseudo_request").with(:headers => {'Content-Type' => 'application/json'}) 15 | end 16 | 17 | it "sets given query parameters" do 18 | subject.get('/pseudo_params', {first: 'argument', second: 'param'}) 19 | WebMock.should have_requested(:get, "10.0.5.5:4243/pseudo_params").with(:query => hash_including({'first' => 'argument', 'second' => 'param'})) 20 | end 21 | 22 | it "returns a valid response for a basic request" do 23 | response = subject.send(:perform_request, :GET, '/containers/ps', {}, {}, nil) 24 | response.should be_kind_of(Docker::Connection::Response) 25 | response.status.should == 200 26 | response.content_type.should == "application/json" 27 | response.body.should_not be_empty 28 | end 29 | 30 | it "returns status 404 for non existent path" do 31 | response = subject.send(:perform_request, :GET, '/invalid_path', {}, {}, nil) 32 | response.status.should == 404 33 | end 34 | 35 | it "returns a valid response for get request" do 36 | response = subject.get('/containers/ps?all=true', {}) 37 | response.status.should == 200 38 | response.body.should_not be_empty 39 | end 40 | 41 | it "returns a valid response for post request" do 42 | id = create_container('connection_post') 43 | response = subject.post("/containers/#{id}/start", {}, '', {}) 44 | response.status.should == 204 45 | response.body.should be_empty 46 | # clean up 47 | delete_containers(id) 48 | end 49 | 50 | it "raises an error for stream without block" do 51 | expect { 52 | subject.stream('/nothing') 53 | }.to raise_error(ArgumentError, 'Block required to handle streaming response') 54 | end 55 | 56 | it "returns a stream", :live do 57 | id = create_and_start_container('test-returns-a-stream', command: hello_world_command) 58 | received_data = [] 59 | params = {stream: 1, stdout: 1} 60 | timeout = 2 61 | 62 | response = subject.stream("/containers/#{id}/attach", params, timeout, {}) do |data| 63 | received_data << data 64 | end 65 | 66 | response.timeout.should be_true 67 | response.status.should == 200 68 | response.content_type.should == 'application/vnd.docker.raw-stream' 69 | response.body.should be_nil 70 | 71 | received_data.first.should == "hello world\n" 72 | received_data.size.should >= 1 73 | 74 | delete_containers(id) 75 | end 76 | 77 | 78 | # Alternative syntax 79 | # "Hello".should == 'Hello' 80 | # expect("Hello").to eq("Hello") 81 | end 82 | -------------------------------------------------------------------------------- /spec/docker/resource/container_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe Docker::Resource::Container do 4 | subject(:containers) { Docker::API.new(base_url: 'http://10.0.5.5:4243').containers } 5 | 6 | describe "lists", :vcr do 7 | before(:all) { 8 | @c1 = create_and_start_container('container_lists1', command: hello_world_command) 9 | @c2 = create_container('container_lists2') 10 | } 11 | after(:all) { delete_containers(@c1, @c2) } 12 | 13 | it "all running containers" do 14 | containers = subject.list 15 | containers.should be_kind_of(Array) 16 | containers.size.should >= 1 17 | containers.first.should have_key("Id") 18 | containers.first['Status'].should include('Up') 19 | end 20 | 21 | it "non-running processes too" do 22 | containers = subject.list(all: true) 23 | containers.size.should >= 2 24 | containers.first['Status'].should include('Exit') 25 | end 26 | 27 | it "limit last created containers" do 28 | containers = subject.list(limit: 1) 29 | containers.size.should == 1 30 | end 31 | 32 | it "processes before a certain created container" do 33 | containers = subject.list(before: @c2) 34 | containers.first["Id"].should include(@c1) 35 | end 36 | 37 | it "processes since a certain created container" do 38 | containers = subject.list(since: @c1) 39 | containers.first["Id"].should include(@c2) 40 | end 41 | end 42 | 43 | describe "create", :vcr do 44 | after { 45 | delete_containers(@container_id) 46 | } 47 | 48 | it "with minimal settings" do 49 | status = subject.create(hello_world_command, 'base') 50 | status.should be_kind_of(Hash) 51 | status.should have_key('Id') 52 | @container_id = status['Id'] 53 | end 54 | 55 | it "with many settings" do 56 | options = { 57 | 'Hostname' => 'test-container', 58 | 'User' => 'test', 59 | 'Memory' => 32.megabytes, 60 | 'MemorySwap' => 64.megabytes, 61 | 'CpuShares' => 1, 62 | 'AttachStdin' => false, 63 | 'AttachStdout' => true, 64 | 'AttachStderr' => true, 65 | 'PortSpecs' => ['80', '443'], 66 | 'Tty' => false, 67 | 'OpenStdin' => false, 68 | 'StdinOnce' => false, 69 | 'Env' => ['PORT=5000', 'ENVIRONTMENT=production'], 70 | 'Dns' => nil, 71 | 'Volumes' => {'/var/lib/app' => {}}, 72 | 'VolumesFrom' => '' 73 | } 74 | status = subject.create(['echo', 'hello world'], 'base', options) 75 | status.should be_kind_of(Hash) 76 | status.should have_key('Id') 77 | 78 | # TODO Compare with show 79 | @container_id = status['Id'] 80 | end 81 | 82 | it "raises an exception when called with invalid options" do 83 | options = { 84 | 'PortSpecs' => '443', 85 | } 86 | expect { 87 | subject.create(['echo', 'hello world'], 'base', options) 88 | }.to raise_error(Docker::Error::InternalServerError) 89 | end 90 | 91 | end 92 | 93 | describe "shows", :vcr do 94 | before(:all) { @c = create_container('container_shows') } 95 | after(:all) { delete_containers(@c)} 96 | 97 | it "the low level details" do 98 | details = subject.show(@c) 99 | details.should be_kind_of(Hash) 100 | details['Id'].should include(@c) 101 | end 102 | 103 | it "raises an exception for an unknown container" do 104 | expect { 105 | subject.show('invalid_id') 106 | }.to raise_error(Docker::Error::ContainerNotFound) 107 | end 108 | end 109 | 110 | describe "changes", :vcr do 111 | before(:all) { 112 | @c = create_and_start_container('container_changes', command: ['touch', '/tmp/changes'], wait: true) 113 | } 114 | after(:all) { delete_containers(@c) } 115 | 116 | it "inspects the container's filesystem changes" do 117 | changes = subject.changes(@c) 118 | changes.should be_kind_of(Array) 119 | changes.any? {|c| c['Path'] == '/tmp/changes'}.should be_true 120 | end 121 | end 122 | 123 | describe "commit", :vcr do 124 | before(:all) { 125 | @c = create_and_start_container('container_commit', command: ['touch', '/tmp/changes'], wait: true) 126 | } 127 | after(:all) { delete_containers(@c) } 128 | 129 | it "creates a new image from the container's changes" do 130 | options = {m: 'Commit message', author: 'Docker Client' } 131 | response = subject.commit(@c, 'test-repo', 'test-tag', options) 132 | response.should have_key('Id') 133 | image_id = response['Id'] 134 | delete_images(image_id) 135 | end 136 | 137 | it "raises an exception for an unknown container" do 138 | expect { 139 | subject.commit('invalid_id', 'test-repo') 140 | }.to raise_error(Docker::Error::ContainerNotFound) 141 | end 142 | end 143 | 144 | describe "export" do 145 | # not yet implemented 146 | end 147 | 148 | describe "start", :vcr do 149 | before(:all) { @c = create_container('container_start') } 150 | after(:all) { delete_containers(@c)} 151 | 152 | it "brings a container into state running" do 153 | started = subject.start(@c) 154 | started.should be_true 155 | end 156 | 157 | it "raises an exception for an unknown container" do 158 | expect { 159 | subject.start('invalid_id') 160 | }.to raise_error(Docker::Error::ContainerNotFound) 161 | end 162 | end 163 | 164 | describe "stop", :vcr do 165 | before(:all) { 166 | @c = create_and_start_container('container_stop', command: hello_world_command) 167 | } 168 | after(:all) { delete_containers(@c) } 169 | 170 | it "halts a container" do 171 | stopped = subject.stop(@c, 5) 172 | stopped.should be_true 173 | end 174 | 175 | it "raises an exception for an unknown container" do 176 | expect { 177 | subject.stop('invalid_id') 178 | }.to raise_error(Docker::Error::ContainerNotFound) 179 | end 180 | end 181 | 182 | describe "restarts", :vcr do 183 | before(:all) { 184 | @c = create_and_start_container('container_restarts', command: hello_world_command) 185 | } 186 | after(:all) { delete_containers(@c) } 187 | 188 | it "the container" do 189 | status = subject.restart(@c, 3) 190 | status.should be_true 191 | end 192 | 193 | it "raises an exception for an unknown container" do 194 | expect { 195 | subject.restart('invalid_id') 196 | }.to raise_error(Docker::Error::ContainerNotFound) 197 | end 198 | 199 | end 200 | 201 | describe "kill", :vcr do 202 | before(:all) { 203 | @c = create_and_start_container('container_kill', command: hello_world_command) 204 | } 205 | after(:all) { delete_containers(@c) } 206 | 207 | it "the container" do 208 | status = subject.kill(@c) 209 | status.should be_true 210 | end 211 | 212 | it "raises an exception for an unknow container" do 213 | expect { 214 | subject.kill('invalid_id') 215 | }.to raise_error(Docker::Error::ContainerNotFound) 216 | end 217 | end 218 | 219 | describe "attach", :vcr, :live do 220 | before(:all) { 221 | @c = create_and_start_container('container_attach', command: hello_world_command) 222 | } 223 | after(:all) { delete_containers(@c) } 224 | 225 | it "returns stdout/stderr by default as a stream" do 226 | received_data = [] 227 | timeout = 3 228 | 229 | response = subject.attach(@c, {}, timeout) do |data| 230 | received_data << data 231 | end 232 | 233 | response.timeout.should be_true 234 | response.status.should == 200 235 | response.content_type.should == 'application/vnd.docker.raw-stream' 236 | response.body.should be_nil 237 | 238 | received_data.first.should == "hello world\n" 239 | received_data.size.should >= 2 240 | end 241 | 242 | it "raises an exception for an unknown container" do 243 | expect { 244 | subject.attach('invalid_id') { } 245 | }.to raise_error(Docker::Error::ContainerNotFound) 246 | end 247 | end 248 | 249 | describe "logs", :vcr do 250 | before(:all) { 251 | @c = create_and_start_container('container_logs', command: ['/bin/sh', '-c', 'echo stdout; echo stderr 1>&2'], wait: true) 252 | } 253 | after(:all) { delete_containers(@c) } 254 | 255 | it "returns the stdout of a container" do 256 | output = subject.logs(@c, {stdout: true}) 257 | output.should include("stdout") 258 | end 259 | 260 | it "returns the stderr of a container" do 261 | output = subject.logs(@c, {stderr: true}) 262 | output.should include("stderr") 263 | end 264 | 265 | it "raises an exception for an unknown container" do 266 | expect { 267 | subject.logs('invalid_id') 268 | }.to raise_error(Docker::Error::ContainerNotFound) 269 | end 270 | end 271 | 272 | describe "wait", :vcr do 273 | before(:all) { 274 | @c = create_and_start_container('container_wait', command: ['sleep', '3']) 275 | } 276 | after(:all) { delete_containers(@c) } 277 | 278 | it "blocks until the container stops" do 279 | status = subject.wait(@c) 280 | status.should be_kind_of(Hash) 281 | status.should have_key('StatusCode') 282 | status['StatusCode'].should == 0 283 | end 284 | 285 | it "raises an exception for an unknown container" do 286 | expect { 287 | subject.wait('invalid_id') 288 | }.to raise_error(Docker::Error::ContainerNotFound) 289 | end 290 | end 291 | 292 | describe "remove", :vcr do 293 | let(:container_id) { 294 | create_container('container_remove', 'Volumes' => {'/var/lib/app' => {}}) 295 | } 296 | 297 | it "deletes the container" do 298 | status = subject.remove(container_id, true) 299 | status.should be_true 300 | end 301 | 302 | it "raises an exception with an invalid container" do 303 | expect { 304 | subject.remove('invalid_ID') 305 | }.to raise_error(Docker::Error::ContainerNotFound) 306 | end 307 | end 308 | 309 | end -------------------------------------------------------------------------------- /spec/docker/resource/image_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe Docker::Resource::Image do 4 | let(:docker) { Docker::API.new(base_url: 'http://10.0.5.5:4243') } 5 | subject(:image) { docker.images } 6 | 7 | describe "list", :vcr do 8 | subject { image.list(all: true) } 9 | 10 | it { should be_kind_of(Array) } 11 | its(:size) { should >= 4 } 12 | it "includes latest base image" do 13 | subject.any? { |i| i["Repository"] == 'base' && i["Tag"] == 'latest' }.should be_true 14 | end 15 | end 16 | 17 | # We should name it 18 | # * image/pull 19 | # * image/upload 20 | describe "create" do 21 | end 22 | 23 | describe "insert" do 24 | end 25 | 26 | describe "show", :vcr do 27 | subject { image.show('base') } 28 | 29 | it { should be_kind_of(Hash) } 30 | it { should have_key('id') } 31 | it { should have_key('container_config') } 32 | it "raises an exception for an unknown image" do 33 | expect { 34 | image.show("invalid_image") 35 | }.to raise_error(Docker::Error::ImageNotFound) 36 | end 37 | end 38 | 39 | describe "history", :vcr do 40 | subject(:image_history) { image.history('base') } 41 | 42 | it { should be_kind_of(Array) } 43 | its(:size) { should >= 2 } 44 | 45 | describe "step" do 46 | subject { image_history.first } 47 | it { should have_key('Id') } 48 | it { should have_key('Created') } 49 | it { should have_key('CreatedBy') } 50 | end 51 | end 52 | 53 | describe "push" do 54 | end 55 | 56 | describe "tag", :vcr do 57 | before(:all) { @img = create_image('test-tag') } 58 | after(:all) { delete_images(@img) } 59 | 60 | it "an image into a repository" do 61 | status = image.tag('test-tag', 'test-repo') 62 | status.should be_true 63 | end 64 | 65 | it "raises an exception for an unknown image" do 66 | expect { 67 | image.tag('inavlid_image', 'test-repo') 68 | # }.to raise_error(Docker::Error::ImageNotFound) 69 | # Should return ImageNotFound, this is an error in Docker source! as it returns 500 and not 404 70 | }.to raise_error(Docker::Error::InternalServerError) 71 | end 72 | end 73 | 74 | describe "remove", :vcr do 75 | before(:all) { @image = create_image('test-image') } 76 | 77 | it "deletes the image" do 78 | subject.remove(@image) 79 | end 80 | 81 | it "raises an exception for an unknown image" do 82 | expect { 83 | subject.remove('unknown-image') 84 | }.to raise_error(Docker::Error::ImageNotFound) 85 | end 86 | end 87 | 88 | # FIXME not working with current Docker master 89 | # describe "search", :vcr do 90 | # it "for an image in the docker index" do 91 | # response = subject.search('sshd') 92 | # response.should be_kind_of(Array) 93 | # response.size.should >= 1 94 | # response.first.should have_key('Name') 95 | # response.first.should have_key('Description') 96 | # end 97 | 98 | # end 99 | 100 | 101 | 102 | 103 | 104 | end -------------------------------------------------------------------------------- /spec/helpers.rb: -------------------------------------------------------------------------------- 1 | module Helpers 2 | 3 | def create_container(name, options = {}) 4 | VCR.use_cassette("test_setup/create_container_#{name}") do 5 | command = options.delete(:command) || 'env' 6 | container_resource.create(command, 'base', options)['Id'] 7 | end 8 | end 9 | 10 | def start_container(id) 11 | VCR.use_cassette('test_setup/start_container') do 12 | container_resource.start(id) 13 | end 14 | end 15 | 16 | def delete_containers(*ids) 17 | VCR.use_cassette('test_setup/delete_container') do 18 | ids.each do |id| 19 | container_resource.remove(id, true) if id 20 | end 21 | end 22 | end 23 | 24 | def wait_on_container(id) 25 | VCR.use_cassette('test_setup/wait_on_container') do 26 | container_resource.wait(id) 27 | end 28 | end 29 | 30 | def commit_container(id, repo) 31 | VCR.use_cassette('test_setup/commit_container') do 32 | container_resource.commit(id, repo)['Id'] 33 | end 34 | end 35 | 36 | def create_and_start_container(name, options = {}) 37 | wait = options.delete(:wait) 38 | 39 | id = create_container(name, options) 40 | start_container(id) 41 | wait_on_container(id) if wait 42 | 43 | id 44 | end 45 | 46 | def hello_world_command 47 | ['/bin/sh', '-c', 'while true; do echo hello world; sleep 1; done'] 48 | end 49 | 50 | def create_image(name) 51 | container_id = create_and_start_container(name, command: ['touch', '/tmp/changes'], wait: true, commit: true) 52 | image_id = commit_container(container_id, name) 53 | delete_containers(container_id) 54 | image_id 55 | end 56 | 57 | def delete_images(*ids) 58 | VCR.use_cassette('test_setup/delete_image') do 59 | ids.each do |id| 60 | image_resource.remove(id) if id 61 | end 62 | end 63 | end 64 | 65 | def image_resource 66 | @_image ||= docker_resource.images 67 | end 68 | 69 | def container_resource 70 | @_container ||= docker_resource.containers 71 | end 72 | 73 | def docker_resource 74 | @_docker ||= Docker::API.new(base_url: 'http://10.0.5.5:4243') 75 | end 76 | 77 | end -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'bundler/setup' 3 | 4 | require 'awesome_print' 5 | require 'webmock/rspec' 6 | require 'vcr' 7 | require 'docker' 8 | require 'helpers' 9 | 10 | 11 | VCR.configure do |config| 12 | config.cassette_library_dir = 'spec/cassettes' 13 | config.hook_into :webmock 14 | config.configure_rspec_metadata! 15 | # :none replays all requests 16 | # :once record if no casette available, otherwise replay or error 17 | # :all re-record all request 18 | # config.default_cassette_options = {:record => :all} 19 | end 20 | 21 | 22 | RSpec.configure do |config| 23 | config.treat_symbols_as_metadata_keys_with_true_values = true 24 | config.run_all_when_everything_filtered = true 25 | config.filter_run :focus 26 | config.filter_run_excluding :live 27 | config.order = 'random' 28 | config.include Helpers 29 | end 30 | 31 | 32 | 33 | --------------------------------------------------------------------------------