Git Product home page Git Product logo

mssql-docker's Introduction

Microsoft SQL Server Docker image

Unofficial images for Microsoft SQL Server on Linux for Docker Engine.

In comparison to the official image this image supports custom build arguments e.g. installing Full Text Search or Polybase.

 

Build args

Supported arguments from SQL Server installer, see here

Important build arguments:

Argument Description
ACCEPT_EULA Set the ACCEPT_EULA variable to any value to confirm your acceptance of the End-User Licensing Agreement. Required setting for the SQL Server image.
MSSQL_SA_PASSWORD Configure the SA user password.
MSSQL_PID Set the SQL Server edition or product key. Possible values include:
Evaluation
Developer
Express
Web
Standard
Enterprise
A product key


If specifying a product key, it must be in the form of #####-#####-#####-#####-#####, where '#' is a number or a letter.
MSSQL_MEMORY_LIMIT_MB Sets the maximum amount of memory (in MB) that SQL Server can use. By default it is 80% of the total physical memory.

In addition, the following build args are available:

Argument Description
SQL_INSTALL_TOOLS Install SQL Server Tools. Package mssq-tools (recommended).
SQL_INSTALL_FULLTEXT Install SQL Server Full Text Search (optional). Package mssql-server-fts
SQL_INSTALL_POLYBASE Install SQL Server Polybase extension. Package mssql-server-polybase
SQL_INSTALL_POLYBASE_HADOOP Install SQL Server Polybase Hadoop extension. Package mssql-server-polybase-hadoop with the missing package mssql-zulu-jre-*.deb

 

Environment variables

Argument Description
ACCEPT_EULA Set the ACCEPT_EULA variable to any value to confirm your acceptance of the End-User Licensing Agreement. Required setting for the SQL Server image.
MSSQL_USER Create an additional user with sysadmin privileges (optional). This requires SQL_INSTALL_TOOLS to be set on build time.
MSSQL_PASSWORD Create an additional user with sysadmin privileges (optional). This requires SQL_INSTALL_TOOLS to be set on build time.
MSSQL_DATABASE Creates an database in recovery mode SIMPLE. This requires SQL_INSTALL_TOOLS to be set on build time.
MSSQL_SQLAGENT_ENABLED If the SQL Server Agent shall be enabled. By default it will be not enabled.

 

Sample build guide

Minimal build

docker build . -t mssql \
    --build-arg ACCEPT_EULA=y

Build with recommended settings

docker build . -t mssql \
    --build-arg ACCEPT_EULA=y \
    --build-arg MSSQL_PID='Developer' \
    --build-arg MSSQL_SA_PASSWORD='<YourStrong!Passw0rd>'
    --build-arg SQL_INSTALL_TOOLS=1

Sample build with Polybase

docker build . -t mssql \
    --build-arg ACCEPT_EULA=y \
    --build-arg MSSQL_PID='Developer' \
    --build-arg MSSQL_SA_PASSWORD='<YourStrong!Passw0rd>' \
    --build-arg SQL_INSTALL_TOOLS=1 \
    --build-arg SQL_INSTALL_POLYBASE=1

 

Starting the image

You need to provide the ACCEPT_EULA environment variable when starting the image:

docker run -e 'ACCEPT_EULA=y' mssql

You can define a custom user, password and database on run time. This requires that you build the docker image with build arg SQL_INSTALL_TOOLS:

docker run -e 'ACCEPT_EULA=y' -e 'MSSQL_USER=MySysAdminUser' -e 'MSSQL_PASSWORD=my!Se3u8e$Passw0rd' -e 'MSSQL_DATABASE=MyUserDatabase' mssql

 

License

The docker file is released under the MIT license.

For Microsoft SQL Server, please have a look at the Microsoft End-User Licensing Agreement and Microsoft SQL Server

mssql-docker's People

Contributors

leo-schick avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.