Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
tutorial:adm:mssql_database_support [2021/03/05 17:15]
apeterova NTLM
tutorial:adm:mssql_database_support [2021/03/30 12:13]
doischert [Develop CzechIdM with MsSQL and a docker]
Line 180: Line 180:
    $ docker exec test-mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P <SA-PASSWORD> -d master -i /import.sql    $ docker exec test-mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P <SA-PASSWORD> -d master -i /import.sql
  
 +==== Use docker-compose ====
 +You can also use the following docker-compose.yml file. The advantage is that it uses persistent volumes and docker-compose cleans after itself better. Copy and edit (if needed) the code below to a file called 'docker-compose.yml':
  
 +<code>
 +version: "3.2"
 +services:
 +  sql-server-db:
 +    container_name: sql-server-db
 +    image: microsoft/mssql-server-linux:2017-latest
 +    ports:
 +      - "1433:1433"
 +    environment:
 +      SA_PASSWORD: "Password123456"
 +      ACCEPT_EULA: "Y"
 +      MSSQL_BACKUP_DIR: "/var/opt/sqlserver"
 +      MSSQL_DATA_DIR: "/var/opt/sqlserver"
 +      MSSQL_LOG_DIR: "/var/opt/sqlserver"
 +    volumes:
 +      - 'systemdbs:/var/opt/mssql'
 +      - 'userdbs:/var/opt/sqlserver'
 +volumes:
 +  systemdbs:
 +  userdbs:
 +</code>
 +
 +Then, in the same directory, use the command `docker-compose up` to start the database.
 ===== Troubleshooting ===== ===== Troubleshooting =====
  
  • by doischert