dimberman commented on a change in pull request #6266: [AIRFLOW-2439] 
Production Docker image support including refactoring of build scripts
URL: https://github.com/apache/airflow/pull/6266#discussion_r332505909
 
 

 ##########
 File path: scripts/docker/install_packages
 ##########
 @@ -17,13 +16,29 @@
 # specific language governing permissions and limitations
 # under the License.
 
-FILES_FOR_REBUILD_CHECK=(
- "setup.py"
- "setup.cfg"
- "Dockerfile"
- "Dockerfile-checklicence"
- ".dockerignore"
- "airflow/version.py"
- "airflow/www/package.json"
- "airflow/www/package-lock.json" )
-export FILES_FOR_REBUILD_CHECK
+# Bash sanity settings (error on exit, complain for undefined vars, error when 
pipe fails)
+set -euo
+
+. /etc/os-release
+
+if [ "${ID}" = "debian" ]; then
+    echo
+    echo "Installing packages for Debian:" "$@"
+    echo
+    apt-get update \
+    && apt-get install -y --no-install-recommends \
+           "$@" \
+    && apt-get autoremove -yqq --purge \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/*
+elif [ "${ID}" = "alpine" ]; then
+    echo
+    echo "Installing packages for Alpine:" "$@"
+    echo
+    apk add --no-cache --virtual .build-deps "$@"
+else
+    echo
+    echo "Exiting. The os ${ID} is unknown."
+    echo
+    exit 1
+fi
 
 Review comment:
   do we need to make one of these for darwin or is the assumption that mac 
users will build this part themselves for local dev?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to