Build from within a git clone by default
Docker does not respect the .dockerignore file when building from a tar. Instead by default we'll make a local clone into a tmp directory and build from there. Subsequent builds will reset the clone to match the checkout. Compared to building directly in the repo, we'll have reproducible builds. Compared to using a git archive: 1. .dockerignore is respected 2. We'll have faster builds - docker can be smarter about caching the build context on subsequent builds from a directory To build from the repo directly, set the build context to "." in the config. If there are uncommitted changes, we'll warn about them either being included or ignored depending on whether we build from the clone.
This commit is contained in:
@@ -140,7 +140,7 @@ class ConfigurationBuilderTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
test "context" do
|
||||
assert_equal "-", @config.builder.context
|
||||
assert_equal ".", @config.builder.context
|
||||
end
|
||||
|
||||
test "setting context" do
|
||||
|
||||
Reference in New Issue
Block a user