Skip to content

Instantly share code, notes, and snippets.

Created October 22, 2021 10:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save SBajonczak/38691a3a92921a3b277afa9f4e77111f to your computer and use it in GitHub Desktop.
Dockerfile to Create a SQL Server with fulltext support
# mssql-agent-fts-ha-tools
# Maintainers: Microsoft Corporation (twright-msft on GitHub)
# GitRepo:
# Base OS layer: Latest Ubuntu LTS
FROM ubuntu:16.04
# Install prerequistes since it is needed to get repo config for SQL server
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -yq curl apt-transport-https && \
# Get official Microsoft repository configuration
curl | apt-key add - && \
curl | tee /etc/apt/sources.list.d/mssql-server.list && \
apt-get update && \
# Install SQL Server from apt
apt-get install -y mssql-server && \
# Install optional packages
apt-get install -y mssql-server-ha && \
apt-get install -y mssql-server-fts && \
# Cleanup the Dockerfile
apt-get clean && \
rm -rf /var/lib/apt/lists
# Run SQL Server process
CMD /opt/mssql/bin/sqlservr
Copy link

Build with

docker build -t sqlft:v1 .

Run with

docker run --name mssqlubuntu -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Schneemann1" -e "MSSQL_AGENT_ENABLED=true" -p 60666:1433 -v {YourLocalPath eg. D:\sql1\data}:/var/opt/mssql/data -d sqlft:v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment