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:
- docker
ruby:
version: ruby-2.2.3
environment:
circleci: true
......@@ -7,7 +7,7 @@ require_relative "support/path_helper"
RSpec.describe "Simple" do
before(:all) do
@debug = true
BuildpackBuilder.new(@debug)
BuildpackBuilder.new(@debug, ENV['CIRCLECI'])
end
after do
......
......@@ -8,9 +8,10 @@ class BuildpackBuilder
TAG = "hone/static:cedar-14"
def initialize(debug = false)
@debug = debug
@image = build_image
def initialize(debug = false, intermediates = false)
@debug = debug
@intermediates = intermediates
@image = build_image
end
def build_image
......@@ -24,6 +25,6 @@ class BuildpackBuilder
-> (chunk) { nil }
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
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