From 9510c1a04525deda24792aa7920aac3e7068ad31 Mon Sep 17 00:00:00 2001 From: Andy Pfister Date: Mon, 8 Sep 2025 10:06:02 +0200 Subject: [PATCH 1/3] Drop support for SQL Server v2017 --- .github/workflows/ci.yml | 9 -------- README.md | 2 +- install.ps1 | 50 +++------------------------------------- 3 files changed, 4 insertions(+), 57 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdcbfbc..eea86dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,17 +26,8 @@ jobs: - windows-2022 - windows-2025 version: - - 2017 - 2019 - 2022 - exclude: - - force-encryption: true - os: ubuntu-24.04 - version: 2017 - - - force-encryption: false - os: ubuntu-24.04 - version: 2017 runs-on: ${{ matrix.os }} steps: diff --git a/README.md b/README.md index f1d394f..c86f122 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ On Windows, we install an Express edition of the container. On Linux, a Docker c * `components`: Specify the components you want to install. Can be `sqlengine` and `sqlcmd`. The list of components needs be a comma-separated list like `sqlengine,sqlcmd`. [GitHub Actions does not support passing YAML lists to composite actions](https://github.com/actions/runner/issues/2238). * `force-encryption`: When you request to install `sqlengine`, you can set this input to `true` in order to encrypt all connections to the SQL server. The action will generate a self-signed certificate for that. Default is `false`. * `sa-password`: The sa password for the SQL instances. Default is `bHuZH81%cGC6`. -* `version`: Version of the SQL server you want to install (2017, 2020 or 2022). +* `version`: Version of the SQL server you want to install (2020 or 2022). ### Example diff --git a/install.ps1 b/install.ps1 index ee90562..26e56e1 100644 --- a/install.ps1 +++ b/install.ps1 @@ -3,7 +3,7 @@ param ( [string[]]$Components, [bool]$ForceEncryption, [string]$SaPassword, - [ValidateSet("2017", "2019", "2022")] + [ValidateSet("2019", "2022")] [string]$Version ) @@ -45,36 +45,6 @@ if ($IsLinux) { if ("sqlengine" -in $Components) { if ($IsLinux) { - # the Ubuntu 24.04 image uses a kernel version which does not work with the current 2017 version. - # see https://github.com/microsoft/mssql-docker/issues/868 - - # but also manual installation is difficult since MSSQL has been released for Ubuntu 18.04 only - # you could backport all of this somehow, but 2017 is EOL soon anyhow - # $ apt install --fix-broken -y ./mssql-server_14.0.3465.1-1_amd64.deb - # Reading package lists... Done - # Building dependency tree... Done - # Reading state information... Done - # Correcting dependencies... Done - # Note, selecting 'mssql-server' instead of './mssql-server_14.0.3465.1-1_amd64.deb' - # mssql-server is already the newest version (14.0.3465.1-1). - # Some packages could not be installed. This may mean that you have - # requested an impossible situation or if you are using the unstable - # distribution that some required packages have not yet been created - # or been moved out of Incoming. - # The following information may help to resolve the situation: - - # The following packages have unmet dependencies: - # mssql-server : Depends: libjemalloc1 but it is not installable - # Depends: libssl1.0.0 but it is not installable - # Depends: python (>= 2.7.0) but it is not installable - # Depends: libldap-2.4-2 but it is not installable - # E: Unable to correct problems, you have held broken packages. - if ($IsUbuntu2404 -And $Version -Eq "2017") { - Write-Error "MSSQL 2017 is not available on Ubuntu 24.04." - Write-Error "See more information at https://github.com/microsoft/mssql-docker/issues/868" - exit 1 - } - if ($ForceEncryption) { Write-Output "Force encryption is set, generating self-signed certificate ..." @@ -102,17 +72,7 @@ forceencryption = 1 $AdditionalContainerConfiguration = "-v /opt/mssql/mssql.conf:/var/opt/mssql/mssql.conf -v /opt/mssql/mssql.pem:/var/opt/mssql/mssql.pem -v /opt/mssql/mssql.key:/var/opt/mssql/mssql.key" } - if ($Version -ne "2017") { - $ToolsPath = "/opt/mssql-tools18" - } - else { - $ToolsPath = "/opt/mssql-tools" - } - - switch($Version) { - "2017" { - $Tag = "CU31-GDR2-ubuntu-18.04" - } + switch ($Version) { "2019" { $Tag = "CU30-ubuntu-20.04" } @@ -122,7 +82,7 @@ forceencryption = 1 } Write-Output "Starting a Docker Container" - Invoke-Expression "docker run --name=`"sql`" -e `"ACCEPT_EULA=Y`"-e `"SA_PASSWORD=$SaPassword`" --health-cmd=`"$ToolsPath/bin/sqlcmd -C -S localhost -U sa -P '$SaPassword' -Q 'SELECT 1' -b -o /dev/null`" --health-start-period=`"10s`" --health-retries=3 --health-interval=`"10s`" -p 1433:1433 $AdditionalContainerConfiguration -d `"mcr.microsoft.com/mssql/server:$Version-$Tag`"" + Invoke-Expression "docker run --name=`"sql`" -e `"ACCEPT_EULA=Y`"-e `"SA_PASSWORD=$SaPassword`" --health-cmd=`"/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P '$SaPassword' -Q 'SELECT 1' -b -o /dev/null`" --health-start-period=`"10s`" --health-retries=3 --health-interval=`"10s`" -p 1433:1433 $AdditionalContainerConfiguration -d `"mcr.microsoft.com/mssql/server:$Version-$Tag`"" Wait-ForContainer } @@ -131,10 +91,6 @@ forceencryption = 1 New-Item -ItemType Directory -Path "C:\Downloads" switch ($Version) { - "2017" { - $DownloadUrl = "https://download.microsoft.com/download/E/F/2/EF23C21D-7860-4F05-88CE-39AA114B014B/SQLEXPR_x64_ENU.exe" - $MajorVersion = 14 - } "2019" { $DownloadUrl = "https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SQLEXPR_x64_ENU.exe" $MajorVersion = 15 From 06a529a8a5a05ec4e961509d1c6f79f41ca4ce53 Mon Sep 17 00:00:00 2001 From: Andy Pfister Date: Mon, 8 Sep 2025 10:07:48 +0200 Subject: [PATCH 2/3] Remove testing against Windows Server 2019 The image has been retired as per 30th of June, 2025. --- .github/workflows/ci.yml | 1 - README.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eea86dc..8694971 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,6 @@ jobs: - ubuntu-20.04 - ubuntu-22.04 - ubuntu-24.04 - - windows-2019 - windows-2022 - windows-2025 version: diff --git a/README.md b/README.md index c86f122..24d32f8 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ On Windows, we install an Express edition of the container. On Linux, a Docker c * `components`: Specify the components you want to install. Can be `sqlengine` and `sqlcmd`. The list of components needs be a comma-separated list like `sqlengine,sqlcmd`. [GitHub Actions does not support passing YAML lists to composite actions](https://github.com/actions/runner/issues/2238). * `force-encryption`: When you request to install `sqlengine`, you can set this input to `true` in order to encrypt all connections to the SQL server. The action will generate a self-signed certificate for that. Default is `false`. * `sa-password`: The sa password for the SQL instances. Default is `bHuZH81%cGC6`. -* `version`: Version of the SQL server you want to install (2020 or 2022). +* `version`: Version of the SQL server you want to install (2019 or 2022). ### Example From 9ee444f971f5ce0178fedd317ba76e35cd690675 Mon Sep 17 00:00:00 2001 From: Andy Pfister Date: Mon, 8 Sep 2025 14:54:34 +0200 Subject: [PATCH 3/3] Remove testing against Ubuntu 20.04 runner image --- .github/workflows/ci.yml | 1 - README.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8694971..0d99f0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,6 @@ jobs: - false os: # ignore ARM64 flavours - - ubuntu-20.04 - ubuntu-22.04 - ubuntu-24.04 - windows-2022 diff --git a/README.md b/README.md index 24d32f8..6905983 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This GitHub action automatically installs a SQL server and `sqlcmd` on Windows and Linux. -On Windows, we install an Express edition of the container. On Linux, a Docker container is started. `sqlcmd` is actually preinstalled on all Windows images as well as Ubuntu 20.04 and 22.04. Essentially, it only has an effect on Ubuntu 24.04. +On Windows, we install an Express edition of the container. On Linux, a Docker container is started. `sqlcmd` is actually preinstalled on all Windows images as well as Ubuntu 22.04. Essentially, it only has an effect on Ubuntu 24.04. ## Usage