Skip to content

Commit 63172bd

Browse files
committed
fix(build): make apt-get upgrade non-interactive in Docker builds
apt-get upgrade -y hit an interactive dpkg conffile prompt (/etc/debian_version) when the DHI base image's base-files package shipped a newer version, blocking on stdin in CI with no TTY to answer it. Sets DEBIAN_FRONTEND=noninteractive and forces the existing conffile to be kept, so an upstream base-files bump can't stall the build again.
1 parent 6f6b4c0 commit 63172bd

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎build/knowlg-service/Dockerfile‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ ARG DHI_IMAGE_RUNTIME=dhi.io/eclipse-temurin:11.0.31-debian13
44
FROM --platform=linux/x86_64 dhi.io/busybox:1.38.0-alpine3.24 as shell
55

66
FROM --platform=linux/x86_64 ${DHI_IMAGE_DEV} AS build
7-
RUN apt-get update \
8-
&& apt-get upgrade -y \
7+
RUN export DEBIAN_FRONTEND=noninteractive \
8+
&& apt-get update \
9+
&& apt-get upgrade -y -o Dpkg::Options::="--force-confold" \
910
&& apt-get install -y unzip curl \
1011
&& apt-get clean \
1112
&& rm -rf /var/lib/apt/lists/*

‎build/search-service/Dockerfile‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ FROM --platform=linux/x86_64 dhi.io/busybox:1.38.0-alpine3.24 as shell
66
# ---- prep stage: unzip/curl need apt + root, so use the dev variant here ----
77
FROM --platform=linux/x86_64 ${DHI_IMAGE_DEV} AS build
88

9-
RUN apt-get update \
10-
&& apt-get upgrade -y \
9+
RUN export DEBIAN_FRONTEND=noninteractive \
10+
&& apt-get update \
11+
&& apt-get upgrade -y -o Dpkg::Options::="--force-confold" \
1112
&& apt-get install -y unzip curl \
1213
&& apt-get clean \
1314
&& rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)