Blog Post

Upgrading SQL Server in a Container

,

I decided to update software on my laptop recently during a trip. I’m loathe to do this on most trips, as I don’t want any instability before a presentation. Usually once I hit the airport, I don’t change anything.

This time I’m visiting a few customers and don’t need to use my computer. I’ll be taking notes on paper, and while working in the hotel, I decided to upgrade Rancher Desktop after a notification, as well as SSMS, VS, and a few other pieces of software. I decided to patch my SQL Servers as well, which was easy. This post shows how.

Upgrading SQL

I don’t have SQL Server installed on my laptop. Instead, I have a few container instances running under Rancher Desktop. Each of these has a docker compose file and a batch file to start and stop the containers. I’ve written about this before, but I didn’t cover upgrades.

Here is the upgrade process. First, I find the docker compose file, which is in c:dataxxx where xxx is the instance. Here is the file for my SQL 2019 instance.

2025-06_line0015

I open this in VS Code, and it looks like this.

2025-06_line0016

I next check the build list for 2019 on SQL Server Central. It shows me that CU32 is the latest, which means I haven’t patched this in some time. I also haven’t used this instance much. I need to change this.

Here’s the change: in the file, I update line 5 to say 32 instead of 27.

2025-06_line0017

I save this and then double click the batch file to start my 2019 instance. When I do that, I see the new image being pulled down.

2025-06_line0018

Once this completes, the container starts and I can connect. When I do that, I see this:

2025-06_line0019

Upgrade complete.

Now to edit the other docker files.

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating