Skip to content

Install msodbcsql, mssql-tools on php images #424

@bizmate

Description

@bizmate

In order to user https://msdn.microsoft.com/en-us/library/hh556234(v=vs.110).aspx SQL Client streaming I would like to install the latest version of msodbcsql and tools on top of the php images but I am failing at the moment. The instructions are ubuntu 15 or 16 specific and the current compatibility problem with packages on debian:jessie as mentioned on #343 in my case is with glibc being older than 2.21

What I attempted to far is to run

FROM php:fpm
MAINTAINER Diego Gullo <diego_gullo@bizmate.biz>

#language-pack-en-base

RUN apt-get update && apt-get install -y \
	libmcrypt-dev libxml2-dev software-properties-common python-software-properties  apt-transport-https \ 
	&& docker-php-ext-install -j$(nproc) mcrypt mbstring xml


# ubuntu 15 mssql pre-requisites
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
	&& curl https://packages.microsoft.com/config/ubuntu/15.10/prod.list > /etc/apt/sources.list.d/mssql-release.list 
RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql mssql-tools \
	&& apt-get install -y unixodbc-dev

RUN echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile \
	&& echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc \
	&& source ~/.bashrc

I get the error on RUN apt-get update step 5

Step 5 : RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql mssql-tools 	&& apt-get install -y unixodbc-dev
 ---> Running in a4978b285e5a
Hit http://security.debian.org jessie/updates InRelease
Get:1 http://security.debian.org jessie/updates/main amd64 Packages [509 kB]
Get:2 https://packages.microsoft.com wily InRelease [2833 B]
Get:3 https://packages.microsoft.com wily/main amd64 Packages [4599 B]
Ign http://deb.debian.org jessie InRelease
Hit http://deb.debian.org jessie-updates InRelease
Hit http://deb.debian.org jessie Release.gpg
Get:4 http://deb.debian.org jessie-updates/main amd64 Packages [17.6 kB]
Hit http://deb.debian.org jessie Release
Get:5 http://deb.debian.org jessie/main amd64 Packages [9065 kB]
Fetched 9599 kB in 3s (2893 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 msodbcsql : Depends: libc6 (>= 2.21) but 2.19-18+deb8u6 is to be installed
 mssql-tools : Depends: libc6 (>= 2.21) but 2.19-18+deb8u6 is to be installed
               Depends: libstdc++6 (>= 5.2) but 4.9.2-10 is to be installed
E: Unable to correct problems, you have held broken packages.
ERROR: Service 'php7' failed to build: The command '/bin/sh -c apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql mssql-tools 	&& apt-get install -y unixodbc-dev' returned a non-zero code: 100

I asked on IRC and updating glibc manually sounds like a dirty approach, see http://stackoverflow.com/questions/10863613/how-to-upgrade-glibc-from-version-2-13-to-2-15-on-debian . Are we getting any updates on debian:jessie that will fix this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions