Upgrading a container
As we all know, software changes. Nothing is forever, and containers are the same. Eventually, one of your Docker containers is going to need upgrading. Thankfully, this is fairly simple with Docker and can be done with minimal downtime – assuming you run the right commands in the right order. You may be able to banish hour-long downtimes for good! Wouldn't that be nice?
Getting started
We'll be using our Windows Server 2019 server that has the container functionality installed on it.
How to do it…
We've been tasked with installing a container that's running a piece of software called MongoDB, so let's do that now on our Windows server:
- If PowerShell is not already open, open PowerShell as an Administrator.
- Let's pretend that we've been tasked with installing a database called MongoDB. We can get that up and running easily with the following command:
docker run -d -p 27017:27017 --name mongodb...