Permalink
Browse files

LXC backend

  • Loading branch information...
ngs committed Sep 25, 2015
1 parent b9018a5 commit 746a9ad05d9f974e356df152a2ea06c74c91196e
Showing with 1 addition and 8 deletions.
  1. +1 −0 docker/serverspec/Gemfile
  2. +0 −8 docker/serverspec/spec/spec_helper.rb
@@ -1,6 +1,7 @@
source 'https://rubygems.org'
gem 'rspec'
gem 'lxc-extra', github: 'ranjib/lxc-extra' if RUBY_PLATFORM.match(/linux/)
gem 'serverspec'
gem 'docker-api'
gem 'rspec_junit_formatter', git: 'git@github.com:circleci/rspec_junit_formatter.git'
@@ -17,18 +17,10 @@
if ENV['CIRCLECI']
module Docker
class Container
def exec(command, opts = {}, &block)
command[2] = command[2].inspect
cmd = %Q{sudo lxc-attach -n #{self.id} -- #{command.join(' ')}}
stdin, stdout, stderr, wait_thread = Open3.popen3 cmd
[stdout.read, [stderr.read], wait_thread.value.exitstatus]
end
def remove(options={})
# do not delete container
end
alias_method :delete, :remove
alias_method :kill, :remove
end
end
end

0 comments on commit 746a9ad

Please sign in to comment.