Skip to content
Permalink
Browse files
LXC backend
  • Loading branch information
ngs committed Sep 25, 2015
1 parent b9018a5 commit 746a9ad05d9f974e356df152a2ea06c74c91196e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
@@ -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.