Sign inSign up

timdoddcool/mssql-fulltext

By timdoddcool

Updated about 1 year ago

Image
0

9.0K

timdoddcool/mssql-fulltext repository overview

A Docker image based on the official Microsoft SQL Server 2022 image with Full-Text Search capabilities enabled.

Features

  • Microsoft SQL Server 2022 (Developer Edition)
  • Full-Text Search (FTS) support enabled
  • Based on Ubuntu 22.04
  • Ready for production and development use

Quick Start

Pull the image
docker pull timdoddcool/mssql-fulltext
Run the container
docker run -e "ACCEPT_EULA=Y" \
           -e "MSSQL_SA_PASSWORD=YourStrong@Passw0rd" \
           -p 1433:1433 \
           --name mssql-fts \
           -d timdoddcool/mssql-fulltext
Connect to SQL Server
docker exec -it mssql-fts /opt/mssql-tools/bin/sqlcmd \
   -S localhost -U SA -P "YourStrong@Passw0rd"

Environment Variables

VariableRequiredDefaultDescription
ACCEPT_EULAYes-Must be set to Y to accept the End User License Agreement
MSSQL_SA_PASSWORDYes-Strong password for the SA account (min 8 chars, uppercase, lowercase, digits, symbols)
MSSQL_PIDNoDeveloperProduct ID or Edition (Developer, Express, Standard, Enterprise, or product key)
Verify Full-Text Search is available
SELECT SERVERPROPERTY('IsFullTextInstalled');
-- Returns 1 if Full-Text Search is installed
Create a Full-Text Catalog
CREATE FULLTEXT CATALOG MyCatalog;
Create a Full-Text Index
-- Assuming you have a table with a primary key
CREATE FULLTEXT INDEX ON MyTable(MyTextColumn)
KEY INDEX PK_MyTable
ON MyCatalog;
Search using Full-Text
-- Contains search
SELECT * FROM MyTable
WHERE CONTAINS(MyTextColumn, 'search term');

-- Freetext search
SELECT * FROM MyTable
WHERE FREETEXT(MyTextColumn, 'search phrase');

Docker Compose Example

version: '3.8'
services:
  mssql:
    image: timdoddcool/mssql-fulltext
    container_name: mssql-fts
    environment:
      - ACCEPT_EULA=Y
      - MSSQL_SA_PASSWORD=YourStrong@Passw0rd
      - MSSQL_PID=Developer
    ports:
      - "1433:1433"
    volumes:
      - mssql_data:/var/opt/mssql
    restart: unless-stopped

volumes:
  mssql_data:

Building from Source

If you want to build the image yourself:

git clone <your-repo-url>
cd mssql-fulltext
docker build -t mssql-fulltext .

Port Information

  • 1433: SQL Server default port

Volume Mounts

  • /var/opt/mssql: SQL Server data directory (recommended for persistent storage)

Notes

  • The SA password must meet SQL Server password requirements (minimum 8 characters, uppercase, lowercase, digits, and symbols)
  • Full-Text Search is automatically available after container startup
  • This image is based on SQL Server 2022 Developer Edition by default
  • For production use, consider using a licensed edition and setting appropriate resource limits

License

This image contains Microsoft SQL Server software which is subject to Microsoft's licensing terms. By using this image, you agree to Microsoft's End User License Agreement.

Support

For SQL Server specific issues, refer to the official Microsoft SQL Server documentation.

For issues with this Docker image, please open an issue in the repository.

Tag summary

Content type

Image

Digest

sha256:72a6f7b8d

Size

1.3 GB

Last updated

about 1 year ago

docker pull timdoddcool/mssql-fulltext