From 31b4dc373f728d1bf2d9853da94ecbf15ec9b709 Mon Sep 17 00:00:00 2001 From: Anthony Lin Date: Thu, 12 Apr 2018 17:11:56 +0000 Subject: [PATCH] Update Airflow/Shipyard Dockerfile As mentioned in [0], the best practice is NOT to use ENV for DEBIAN_FRONTEND as it will persists in the final image. It appears that the common consensus is to use ARG instead so that noninteractive DEBIAN_FRONTEND is set only during build. [0] https://github.com/moby/moby/issues/4032 Change-Id: I6980e140ee5a51596a2f9ba4e1471e2c98599846 --- images/airflow/Dockerfile | 4 ++-- images/shipyard/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/images/airflow/Dockerfile b/images/airflow/Dockerfile index 7295ff79..83bb9a59 100644 --- a/images/airflow/Dockerfile +++ b/images/airflow/Dockerfile @@ -19,7 +19,6 @@ FROM ubuntu:16.04 # Set port 8080 for Airflow Web # Set port 5555 for Airflow Flower # Set port 8793 for Airflow Worker -ENV DEBIAN_FRONTEND noninteractive ENV container docker ENV WEB_PORT 8080 ENV FLOWER_PORT 5555 @@ -30,8 +29,9 @@ EXPOSE $WEB_PORT EXPOSE $FLOWER_PORT EXPOSE $WORKER_PORT -# Airflow Home Directory +# Set ARG for usage during build ARG AIRFLOW_HOME=/usr/local/airflow +ARG DEBIAN_FRONTEND=noninteractive # Kubectl version ARG KUBECTL_VERSION=1.8.6 diff --git a/images/shipyard/Dockerfile b/images/shipyard/Dockerfile index 9cdf994b..2d61de32 100644 --- a/images/shipyard/Dockerfile +++ b/images/shipyard/Dockerfile @@ -14,12 +14,13 @@ FROM python:3.5 -ENV DEBIAN_FRONTEND noninteractive ENV container docker ENV PORT 9000 ENV LC_ALL C.UTF-8 ENV LANG C.UTF-8 +ARG DEBIAN_FRONTEND=noninteractive + # Expose port 9000 for application EXPOSE $PORT