# File lib/docker/container.rb, line 132 def commit(options = {}) options.merge!('container' => self.id[0..7]) # [code](https://github.com/dotcloud/docker/blob/v0.6.3/commands.go#L1115) # Based on the link, the config passed as run, needs to be passed as the # body of the post so capture it, remove from the options, and pass it via # the post body config = MultiJson.dump(options.delete('run')) hash = Docker::Util.parse_json( connection.post('/commit', options, body: config) ) Docker::Image.send(:new, self.connection, hash) end