potiuk commented on code in PR #35868:
URL: https://github.com/apache/airflow/pull/35868#discussion_r1406978989


##########
Dockerfile:
##########
@@ -342,87 +342,6 @@ if [[ ${INSTALL_MYSQL_CLIENT:="true"} == "true" ]]; then
 fi
 EOF
 
-# The content below is automatically copied from 
scripts/docker/install_mssql.sh
-COPY <<"EOF" /install_mssql.sh
-#!/usr/bin/env bash
-set -euo pipefail
-
-. "$( dirname "${BASH_SOURCE[0]}" )/common.sh"
-
-: "${AIRFLOW_PIP_VERSION:?Should be set}"
-
-: "${INSTALL_MSSQL_CLIENT:?Should be true or false}"
-
-COLOR_BLUE=$'\e[34m'
-readonly COLOR_BLUE
-COLOR_RESET=$'\e[0m'
-readonly COLOR_RESET
-
-function install_mssql_client() {
-    # Install MsSQL client from Microsoft repositories
-    if [[ ${INSTALL_MSSQL_CLIENT:="true"} != "true" ]]; then
-        echo
-        echo "${COLOR_BLUE}Skip installing mssql client${COLOR_RESET}"
-        echo
-        return
-    fi
-    echo
-    echo "${COLOR_BLUE}Installing mssql client${COLOR_RESET}"
-    echo
-    local distro
-    local version
-    distro=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
-    version=$(lsb_release -rs)
-    local driver=msodbcsql18
-    curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg 
--dearmor -o /usr/share/keyrings/microsoft-prod.gpg
-    curl --silent https://packages.microsoft.com/keys/microsoft.asc | apt-key 
add - >/dev/null 2>&1
-    curl --silent 
"https://packages.microsoft.com/config/${distro}/${version}/prod.list"; > \
-        /etc/apt/sources.list.d/mssql-release.list
-    apt-get update -yqq
-    apt-get upgrade -yqq
-    ACCEPT_EULA=Y apt-get -yqq install -y --no-install-recommends "${driver}"
-    rm -rf /var/lib/apt/lists/*
-    apt-get autoremove -yqq --purge
-    apt-get clean && rm -rf /var/lib/apt/lists/*

Review Comment:
   Update: removing both odbs and pymssql makes the layer 88MB so ~ 50 MB less. 
Not sure how much of that is pymssql and how much mssql odbc. Assuming 50/50 we 
can save 25 MB by removing msodc which is `< 2%` of the image size. IMHO not 
worth to remove anything here.



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to