Get started with SQL Server on CentOS using Docker

SQL is a special-purpose programming language designed to handle data in a relational database management system. A database server is a computer program that provides database services to other programs or computers, as defined by the client-server model. Therefore, a SQL Server is a database server that implements the Structured Query Language (SQL).

Install Docker

Install Docker First, to install SQL Server, you need to install Docker. If you already have it installed, go to the following command (as root)

# curl -s | sudo sh

Make sure the installation is complete

# docker version

With this check, if you get: Cannot connect to the Docker daemon. Is the docker daemon running on this host? Launch Docker using the command below:

# service docker start

Then enter the following command to automatically launch Docker at boot time:

# systemctl enable docker

Install SQL Server

Install SQL Server using the following command:

# docker run --restart always -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=YourStrongP@SSW0RD' -e 'MSSQL_PID=Developer' -p 1433:1433 --name SQL_CONTAINER -d microsoft/mssql-server-linux

Below, it will be described in detail for what certain teams and their functions and application are responsible for:

  • –restart always – Restarting the container if for any reason it is completed;
  • -e ‘ACCEPT_EULA = Y’- This is a parameter that prompts you to accept the end user license agreement. If you do not agree, the installation will not continue.
  • e ‘MSSQL_PID = Developer’- This is the parameter for entering the license and product key. It can be used with Developer, Evaluationб Express, Web, Enterprise, Standard;
  • –name SQL_CONTAINER – Specifies the name of the container;
  • -d microsoft / mssql-server-linux- container image. If not specified, by default it will be installed with the latest version.

Was this article helpful?

Related Articles

Leave A Comment?