Revisit usage of DEBIAN_FRONTEND=noninteractive.

- Use ARG command in 22.04 to set the variable only during build (https://github.com/moby/moby/issues/4032#issuecomment-192327844).
- Remove the command entirely in 24.04 since newer version of APT is smarter (https://github.com/moby/moby/issues/4032#issuecomment-2008339218).

PiperOrigin-RevId: 633548518
This commit is contained in:
Tomoki Nakagawa
2024-05-14 12:20:14 +00:00
committed by Hiroyuki Komatsu
parent b186b0500d
commit e122f75317
2 changed files with 1 additions and 3 deletions

View File

@ -32,7 +32,7 @@
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
ARG DEBIAN_FRONTEND=noninteractive
# Package installation
## https://docs.docker.com/develop/develop-images/instructions/#apt-get

View File

@ -32,8 +32,6 @@
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND noninteractive
# Package installation
## https://docs.docker.com/develop/develop-images/instructions/#apt-get
RUN apt-get update && apt-get install -y \