mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
docker: Set DEBIAN_FRONTEND only during build
From the Dockerfile docs: > Environment variable persistence can cause unexpected side effects. > For example, setting ENV DEBIAN_FRONTEND=noninteractive changes the > behavior of apt-get, and may confuse users of your image. > > If an environment variable is only needed during build, and not in the > final image, consider setting a value for a single command instead. So this patch adjusts the use of the DEBIAN_FRONTEND variable to match the documented best practice. https://github.com/albertito/chasquid/pull/68 Amended-by: Alberto Bertogli <albertito@blitiri.com.ar> Adjusted commit message.
This commit is contained in:
committed by
Alberto Bertogli
parent
c6e3fb42b0
commit
2e6bc52f6a
@@ -17,13 +17,12 @@ RUN go get -d ./... && \
|
|||||||
# Create the image.
|
# Create the image.
|
||||||
FROM debian:stable
|
FROM debian:stable
|
||||||
|
|
||||||
# Make debconf/frontend non-interactive, to avoid distracting output about the
|
|
||||||
# lack of $TERM.
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
# Install the packages we need.
|
# Install the packages we need.
|
||||||
# This includes chasquid, which sets up good defaults.
|
# This includes chasquid, which sets up good defaults.
|
||||||
RUN apt-get update -q && \
|
# Make debconf/frontend non-interactive, to avoid distracting output about the
|
||||||
|
# lack of $TERM.
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt-get update -q && \
|
||||||
apt-get install -y -q \
|
apt-get install -y -q \
|
||||||
chasquid \
|
chasquid \
|
||||||
dovecot-lmtpd dovecot-imapd dovecot-pop3d \
|
dovecot-lmtpd dovecot-imapd dovecot-pop3d \
|
||||||
|
|||||||
Reference in New Issue
Block a user