From 6e693bc1e382fbed8bfcf3d96c5a049985ebc722 Mon Sep 17 00:00:00 2001 From: Yankee Date: Sat, 6 Jun 2020 15:20:48 +0545 Subject: [PATCH 1/4] Added md5 checksum for MYSQL Connector --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7ebcc5a..ed45114 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,13 +9,15 @@ COPY requirements.txt . RUN \ export ACCEPT_EULA='Y' && \ export MYSQL_CONNECTOR='mysql-connector-odbc-8.0.18-linux-glibc2.12-x86-64bit' && \ + export MYSQL_CONNECTOR_CHECKSUM='f2684bb246db22f2c9c440c4d905dde9' && \ apt-get update && \ apt-get install -y curl build-essential unixodbc-dev g++ apt-transport-https && \ # # Install pyodbc db drivers for MSSQL, PG and MySQL curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \ curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list && \ - curl -L -o ${MYSQL_CONNECTOR}.tar.gz https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/${MYSQL_CONNECTOR}.tar.gz && \ + curl -L -o mysql-connector-odbc-8.0.18-linux-glibc2.12-x86-64bit.tar.gz https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/mysql-connector-odbc-8.0.18-linux-glibc2.12-x86-64bit.tar.gz && \ + echo "${MYSQL_CONNECTOR_CHECKSUM} ${MYSQL_CONNECTOR}.tar.gz" | md5sum -c - && \ apt-get update && \ gunzip ${MYSQL_CONNECTOR}.tar.gz && tar xvf ${MYSQL_CONNECTOR}.tar && \ cp ${MYSQL_CONNECTOR}/bin/* /usr/local/bin && cp ${MYSQL_CONNECTOR}/lib/* /usr/local/lib && \ From f402bc812b9335411e9a9f89cbeb18d3bcfa6c23 Mon Sep 17 00:00:00 2001 From: Yankee Date: Sat, 6 Jun 2020 15:51:37 +0545 Subject: [PATCH 2/4] Added Variables for connector name --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ed45114..74c094d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ RUN \ # Install pyodbc db drivers for MSSQL, PG and MySQL curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \ curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list && \ - curl -L -o mysql-connector-odbc-8.0.18-linux-glibc2.12-x86-64bit.tar.gz https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/mysql-connector-odbc-8.0.18-linux-glibc2.12-x86-64bit.tar.gz && \ + curl -L -o ${MYSQL_CONNECTOR}.tar.gz https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/${MYSQL_CONNECTOR}.tar.gz && \ echo "${MYSQL_CONNECTOR_CHECKSUM} ${MYSQL_CONNECTOR}.tar.gz" | md5sum -c - && \ apt-get update && \ gunzip ${MYSQL_CONNECTOR}.tar.gz && tar xvf ${MYSQL_CONNECTOR}.tar && \ From c2ab06d8953491f151548ae9f0897afeb88c4651 Mon Sep 17 00:00:00 2001 From: Yankee Date: Sat, 6 Jun 2020 17:09:14 +0545 Subject: [PATCH 3/4] Add signature check of the MYSQL connector package using gpg. --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 74c094d..38f62b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,14 @@ RUN \ export MYSQL_CONNECTOR_CHECKSUM='f2684bb246db22f2c9c440c4d905dde9' && \ apt-get update && \ apt-get install -y curl build-essential unixodbc-dev g++ apt-transport-https && \ + gpg --keyserver hkp://keys.gnupg.net --recv-keys 5072E1F5 && \ # # Install pyodbc db drivers for MSSQL, PG and MySQL curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \ curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list && \ curl -L -o ${MYSQL_CONNECTOR}.tar.gz https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/${MYSQL_CONNECTOR}.tar.gz && \ + curl -L -o ${MYSQL_CONNECTOR}.tar.gz.asc https://downloads.mysql.com/archives/gpg/\?file\=${MYSQL_CONNECTOR}.tar.gz\&p\=10 && \ + gpg --verify ${MYSQL_CONNECTOR}.tar.gz.asc && \ echo "${MYSQL_CONNECTOR_CHECKSUM} ${MYSQL_CONNECTOR}.tar.gz" | md5sum -c - && \ apt-get update && \ gunzip ${MYSQL_CONNECTOR}.tar.gz && tar xvf ${MYSQL_CONNECTOR}.tar && \ From e8b45cf54bdc68e8f17b442889f0e99ced07fe57 Mon Sep 17 00:00:00 2001 From: Yankee Date: Sat, 6 Jun 2020 17:41:24 +0545 Subject: [PATCH 4/4] Update distribution. Add python version. --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 673bc0a..2734f06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,9 @@ -dist: xenial +dist: bionic + +language: python + +python: + - "3.7" branches: only: