Skip to content

Commit b39f0f6

Browse files
authored
Merge pull request #52 from laudio/CLOUD-859
Update CommLog value to 0 in odbcinst.ini file for removing comm logs
2 parents f5c940d + aee82db commit b39f0f6

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ script:
4343

4444
# Spin up a mssql, pg & mysql database server containers
4545
- docker run --name test-mysql-server -e MYSQL_USER=${TEST_MYSQL_DB_USER} -e MYSQL_DATABASE=${TEST_MYSQL_DB_NAME} -e MYSQL_PASSWORD=${TEST_MYSQL_DB_PASSWORD} -d -p 3306:3306 mysql/mysql-server:latest
46-
- docker run --name test-mssql-server -e ACCEPT_EULA=Y -e SA_PASSWORD=${TEST_MSSQL_DB_PASSWORD} -d -p 1433:1433 microsoft/mssql-server-linux:2017-GA
46+
- docker run --name test-mssql-server -e ACCEPT_EULA=Y -e SA_PASSWORD=${TEST_MSSQL_DB_PASSWORD} -d -p 1433:1433 mcr.microsoft.com/mssql/server:2017-latest
4747
- docker run --name test-pg-server -e POSTGRES_USER=${TEST_PG_DB_USER} -e POSTGRES_DB=${TEST_PG_DB_NAME} -e POSTGRES_PASSWORD=${TEST_PG_DB_PASSWORD} -d -p 5432:5432 postgres
4848
- sleep 20s
4949

Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ RUN \
1111
export MYSQL_CONNECTOR='mysql-connector-odbc-8.0.18-linux-glibc2.12-x86-64bit' && \
1212
export MYSQL_CONNECTOR_CHECKSUM='f2684bb246db22f2c9c440c4d905dde9' && \
1313
apt-get update && \
14-
apt-get install -y curl build-essential unixodbc-dev g++ apt-transport-https && \
15-
gpg --keyserver hkp://keys.gnupg.net --recv-keys 5072E1F5 && \
14+
apt-get install -y curl && \
15+
curl -L -o multiarch-support_2.27-3ubuntu1_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1_amd64.deb && \
16+
apt-get install -y ./multiarch-support_2.27-3ubuntu1_amd64.deb && \
17+
apt-get install -y build-essential unixodbc-dev g++ apt-transport-https && \
18+
gpg --keyserver keyserver.ubuntu.com --recv-keys 5072E1F5 && \
1619
#
1720
# Install pyodbc db drivers for MSSQL, PG and MySQL
1821
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
@@ -28,8 +31,8 @@ RUN \
2831
myodbc-installer -a -d -n "MySQL ODBC 8.0" -t "Driver=/usr/local/lib/libmyodbc8a.so" && \
2932
apt-get install -y msodbcsql17 odbc-postgresql && \
3033
#
31-
# Update odbcinst.ini to make sure full path to driver is listed
32-
sed 's/Driver=psql/Driver=\/usr\/lib\/x86_64-linux-gnu\/odbc\/psql/' /etc/odbcinst.ini > /tmp/temp.ini && \
34+
# Update odbcinst.ini to make sure full path to driver is listed, and set CommLog to 0. i.e disables any communication logs to be written to files
35+
sed 's/Driver=psql/Driver=\/usr\/lib\/x86_64-linux-gnu\/odbc\/psql/;s/CommLog=1/CommLog=0/' /etc/odbcinst.ini > /tmp/temp.ini && \
3336
mv -f /tmp/temp.ini /etc/odbcinst.ini && \
3437
# Install dependencies
3538
pip install --upgrade pip && \

0 commit comments

Comments
 (0)