Docker image microsoft/mssql-server-windows-developer: There is not enough space on disk

Hello

I’m new here. I’am using Travis CI and I would like to test the app with a MS SQL Server Database. I First tried to run a linux docker image, but unfortunately Linux Images are not supported on the Travis CI Windows Environment. So I decided to use a Windows Image like that:

before_script:
  - docker run --name=mssql-server-windows-latest -e 'ACCEPT_EULA=Y' -e '``MSSQL_SA_PASSWORD=YourStrong!Passw0rd' -p 1433:1433 -d microsoft/mssql-server-windows-developer

But then I got the following error:

The command "docker run --name=mssql-server-windows-latest -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=YourStrong!Passw0rd' -p 1433:1433 -d microsoft/mssql-server-windows-developer" failed and exited with 125 during .

Your build has been stopped.

C:\Program Files\Docker\docker.exe: failed to register layer: re-exec error: exit status 1: output: BackupWrite \\?\C:\ProgramData\docker\windowsfilter\0f7927ece702a909903b1c8b3ab8e01feae62a713d824e7bf835b6e9c6444fd3\Files\Windows\IME\IMEJP\DICTS\SDDS0411.DIC: There is not enough space on the disk.

What could I do now? Would you please help me?

The build: https://travis-ci.org/UBitSandBox/HYBRID-REST/builds/643270300

Thanks a lot!

https://hub.docker.com/r/microsoft/mssql-server-windows-developer/tags

The latest image is 8+ GB. I am guessing that the image expands to a size that we cannot currently support.

Enlarging the disk size might be an option, but we can’t guarantee that this is going to happen.

Even with the smaller microsoft/mssql-server-windows-developer:2017 that doesn’t work.

So what are my options now?

I’ve also tried chocolatey… I would like to avoid Azure SQL Server…

Thanks

This seems to be the solution:

before_script:

  • choco install mssqlserver2014-sqllocaldb
  • powershell -Command “Set-ExecutionPolicy Bypass”

It’s also possible with Docker, but with a smaller Image (christianacca/mssql-server-windows-express:1803)

  - docker pull christianacca/mssql-server-windows-express:1803
  - docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=MyPassword42' -p 1433:1433 -d christianacca/mssql-server-windows-express:1803
  - powershell -Command "Set-ExecutionPolicy Bypass"
  - PowerShell -Command 'Set-ExecutionPolicy -ExecutionPolicy RemoteSigned'
  - PowerShell -File mssql_travis_load.ps1

I’m starting a script file, loading the PowerShell SqlServer Module. I have put the module nupkg file in my project repository and changed the file extension to zip. The zip file is then unzipped in the users’s modules folder and the module is imported. https://www.powershellgallery.com/packages/Sqlserver/21.1.18218. Finally I’m creating the database and executing the .sql script file using invoke-sqlcmd.

This is the script file mssql_travis_load.ps1:

Add-Type -AssemblyName System.IO.Compression.FileSystem
function Unzip
{
    param([string]$zipfile, [string]$outpath)

    [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
}

$modulesPaths = $env:PSModulePath

Write-Host("Current Modules Path: $modulesPath")

$localModulesPath = ($modulesPaths -split ";")[0]

Write-Host("Current Local Modules Path: $localModulesPath")

$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition

Write-Host("Current Script Path: $scriptPath")

$moduleZipPath = Join-Path -Path $scriptPath -ChildPath "sqlserver.21.1.18218.zip"
$destPath = Join-Path -Path $localModulesPath -ChildPath "sqlserver"

Write-Host("Unzipping file $moduleZipPath in $destPath")

Unzip $moduleZipPath $destPath

Write-Host("Importing Module sqlserver")

Import-Module -Name sqlserver

Write-Host("Import Done, now loading Database")

$sqlServer = 'localhost'
$database = 'Test'

Write-Host("Creating Database")

invoke-sqlcmd -ServerInstance "$sqlserver" -U "SA" -P "MyPassword42" -Query "CREATE DATABASE $database;"
$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path

Write-Host("Executing SQL Script")

invoke-sqlcmd -ServerInstance "$sqlserver" -U "SA" -P "MyPassword42" -InputFile "$ScriptDir\mssql_database.sql"
1 Like
Imprint