Skip to content

Commit

Permalink
run nix-collect-garbage -d after installing nix packages (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
coffee-cup authored Sep 7, 2022
1 parent a426b6d commit 150efad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nixpacks/builder/docker/dockerfile_generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ impl DockerfileGenerator for Phase {
.to_slash()
.context("Failed to convert nix file path to slash path.")?;
format!(
"COPY {nix_file_path} {nix_file_path}\nRUN nix-env -if {nix_file_path}",
"COPY {nix_file_path} {nix_file_path}\nRUN nix-env -if {nix_file_path} && nix-collect-garbage -d",
nix_file_path = nix_file_path
)
} else {
Expand Down

0 comments on commit 150efad

Please sign in to comment.