don't include the .git directory in the context send to docker build

without this `DNS_TEST_SUBJECT="hickory $URL" cargo t` was re-building
hickory from scratch even when its source had not change

not including the `.git` directory in the hickory repository lets Docker
see that the source code has not changed
This commit is contained in:
Jorge Aparicio 2024-02-16 13:56:49 +01:00
parent 9bfa4c5c71
commit 0afae4f042

View File

@ -57,6 +57,9 @@ impl Container {
exec_or_panic(&mut cp_r, false);
}
fs::write(docker_build_dir.join(".dockerignore"), "src/.git")
.expect("could not create .dockerignore file");
exec_or_panic(&mut command, verbose_docker_build());
});