microsoft / mssql-docker

Official Microsoft repository for SQL Server in Docker resources
MIT License
1.72k stars 759 forks source link

How to add Full-Text Search into 2017-CU16 #500

Open cilerler opened 5 years ago

cilerler commented 5 years ago

Since we are not able to enable Full-Text Search through environment variable as we do with Agent, I was trying to follow the code in mssql-agent-fts-ha-tools.

And then, I changed the code below to eliminate the rest of the file maintenance.

FROM mcr.microsoft.com/mssql/server:2017-CU16-ubuntu
RUN wget -O /etc/apt/sources.list.d/mssql-server-2017.list https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list && \
    export DEBIAN_FRONTEND=noninteractive && \
    apt-get update && \
    apt-get install -y mssql-server-fts && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists

Next, I realized installing mssql-server-fts installed mssql-server "again". So I wonder if the version it installed is different than the original mcr.microsoft.com/mssql/server:2017-CU16-ubuntu image, or did it install it into the same place?

ii  mssql-server             14.0.3223.3-15    amd64             Microsoft SQL Server Relational Database Engine
ii  mssql-server-fts         14.0.3223.3-15    amd64             Microsoft SQL Server Full Text Search.

Which could be a problem when you have a new latest version (such as 2017-CU17) of the mssql-server-fts which then will install that even I derived from 2017-CU16-ubuntu

I tried to locate the Dockerfile to see how did you install the mssql-server but I couldn't find it in anywhere, and the one in this repo is two years old.

So, to understand it better, can you provide me a link to see Dockerfile of the mcr.microsoft.com/mssql/server:2017-CU16-ubuntu, please? If it is an internal thing, can you put me to the correct path?

I am looking forward to having an environment variable for Full-Text search too.

flcdrg commented 4 years ago

You're getting two installed because of your first line FROM mcr.microsoft.com/mssql/server:2017-CU16-ubuntu

Go back to https://github.com/Microsoft/mssql-docker/blob/master/linux/preview/examples/mssql-agent-fts-ha-tools/Dockerfile and use the FROM similar to that file

overmailed commented 3 years ago

The following dirty hack worked for me (2019-CU9 official container running ubuntu 18.04). I downloaded the corresponding mssql-server-fts package as per https://packages.microsoft.com/config/ubuntu/18.04/mssql-server-2019.list and installed it ignoring all the dependencies via dpkg. The container is no production use for me, so this quick solution was just fine for my testing purposes.

This was something like the following from inside the container shell with root privileges:

apt-get update
apt-get install curl
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
apt-get install gnupg2
apt-get install gnupg
curl https://packages.microsoft.com/config/ubuntu/18.04/mssql-server-2019.list | tee /etc/apt/sources.list.d/mssql-server.list
apt-get update
apt-get download mssql-server-fts
dpkg --force-all -i ./mssql-server-fts_15.0.4123.1-5_amd64.deb