Commit 50aaaac9 authored by Terence Lee's avatar Terence Lee

circleci doesn't allow removing containers on the root fs

parent 22d2dba5
...@@ -3,3 +3,5 @@ machine: ...@@ -3,3 +3,5 @@ machine:
- docker - docker
ruby: ruby:
version: ruby-2.2.3 version: ruby-2.2.3
environment:
circleci: true
...@@ -7,7 +7,7 @@ require_relative "support/path_helper" ...@@ -7,7 +7,7 @@ require_relative "support/path_helper"
RSpec.describe "Simple" do RSpec.describe "Simple" do
before(:all) do before(:all) do
@debug = true @debug = true
BuildpackBuilder.new(@debug) BuildpackBuilder.new(@debug, ENV['CIRCLECI'])
end end
after do after do
......
...@@ -8,8 +8,9 @@ class BuildpackBuilder ...@@ -8,8 +8,9 @@ class BuildpackBuilder
TAG = "hone/static:cedar-14" TAG = "hone/static:cedar-14"
def initialize(debug = false) def initialize(debug = false, intermediates = false)
@debug = debug @debug = debug
@intermediates = intermediates
@image = build_image @image = build_image
end end
...@@ -24,6 +25,6 @@ class BuildpackBuilder ...@@ -24,6 +25,6 @@ class BuildpackBuilder
-> (chunk) { nil } -> (chunk) { nil }
end end
Docker::Image.build_from_dir(buildpack_path.to_s, 't' => TAG, 'rm' => true, 'dockerfile' => "spec/support/docker/Dockerfile", &print_output) Docker::Image.build_from_dir(buildpack_path.to_s, 't' => TAG, 'rm' => !@intermediates, 'dockerfile' => "spec/support/docker/Dockerfile", &print_output)
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment