summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/apt.go3
-rw-r--r--config/apt_test.go3
2 files changed, 6 insertions, 0 deletions
diff --git a/config/apt.go b/config/apt.go
index 01f914e..bafc06a 100644
--- a/config/apt.go
+++ b/config/apt.go
@@ -30,6 +30,9 @@ func (apt AptConfig) InstructionsForPhase(phase build.Phase) []build.Instruction
switch phase {
case build.PhasePrivileged:
return []build.Instruction{
+ build.Env{map[string]string{
+ "DEBIAN_FRONTEND": "noninteractive",
+ }},
build.RunAll{[]build.Run{
{"apt-get update", []string{}},
{"apt-get install -y", apt.Packages},
diff --git a/config/apt_test.go b/config/apt_test.go
index 751bfcd..df2480d 100644
--- a/config/apt_test.go
+++ b/config/apt_test.go
@@ -40,6 +40,9 @@ func TestAptConfigInstructions(t *testing.T) {
t.Run("PhasePrivileged", func(t *testing.T) {
assert.Equal(t,
[]build.Instruction{
+ build.Env{map[string]string{
+ "DEBIAN_FRONTEND": "noninteractive",
+ }},
build.RunAll{[]build.Run{
{"apt-get update", []string{}},
{"apt-get install -y", []string{"libfoo", "libbar"}},