40

On Mac, I'm running Lando inside Docker. I'm on Lando v3.0.1 and was running Docker Desktop v2.2.0.5 successfully.

Docker released stable an update v.2.3.0.3 and I installed it. After that I attempted to run Lando, but got a warning message stating the Docker Desktop version is not supported.

So, I'm wondering if it is possible to roll back to my previous Docker Desktop version without uninstalling Docker.

halfer
  • 19,824
  • 17
  • 99
  • 186
user3891775
  • 1,121
  • 2
  • 9
  • 13
  • Do you still have the installer for the previous version of Docker Desktop? – halfer Jun 05 '20 at 15:45
  • nope; it was an update from an update from an update, etc; so the version I have is pretty old about an year old. – user3891775 Jun 05 '20 at 16:20
  • 3
    Try the [list of old installers here](https://docs.docker.com/docker-for-windows/release-notes/). – halfer Jun 05 '20 at 16:39
  • Thanks; yes, I have downloaded the 2.2.0.5 version, but before I run it, I was wondering if there is a way to roll back to a previous version without having to replace the current installation – user3891775 Jun 05 '20 at 16:54
  • I don't know of one. However I would expect DD to keep its settings if you install the earlier version - it should detect that another version is installed, and will know how to overwrite it. – halfer Jun 05 '20 at 16:56
  • so, I went ahead and and run the old install Docker v. 2.2.0.5 it replaced the previous version, and deleted all running containers (that was the scary part) After I recreated the container (Drupal 7 site), I got an error message when attempting to run to the site. I'm going to answer to my own question explaining what I did, so it might help another person looking for an answer on this. – user3891775 Jun 05 '20 at 18:36
  • Did it remove the stopped containers too (i.e. if you run `docker ps --all`)? I would be surprised if it does. – halfer Jun 05 '20 at 18:37
  • yes; everything that was running before got destroyed. – user3891775 Jun 05 '20 at 18:41
  • Ah, sorry to hear that. Can it be recreated? – halfer Jun 05 '20 at 18:43
  • Maybe there is an oddity on Windows that does that - it does not happen in Linux when one is up/downgrading. – halfer Jun 05 '20 at 18:44

5 Answers5

65
  1. Download your desired version from the Release Notes.
  2. Open the download, drag "Docker" to "Applications"
  3. Chose to "Replace" the existing installation
  4. Run Docker desktop

All your previous containers should still be there.

Niel de Wet
  • 7,806
  • 9
  • 63
  • 100
7

Docker Desktop Options

If you're using Docker Desktop, I found deselecting the option Use Docker Compose V2 fixed my problems. Spent a long time working on reinstalling things. Definitely worth a try before doing anything big.

buddemat
  • 4,552
  • 14
  • 29
  • 49
Toby Smith
  • 71
  • 1
  • 3
  • I had problems whenever I changed something on my source code, the images were build but the containers were not replaced/restarted any more. By removing this settings this was fixed (Docker Desktop for Mac v 4.6.0) – crebuh Mar 18 '22 at 14:11
2

[Answer 2022]

As said @patricknelson

Sadly, this no longer works. Now it only says "Existing installation is up to date".

And workaround of Docker Descktop downgrade with retains of the data described below:

  1. Get a list of containers

    docker container ls
    
  2. Commit the container to save the data:

    docker commit -p 64bf7c9f7122 new-image
    

    where 64bf7c9f7122 - id of my container

    new-image - new image name

  3. Save the committed image with changes to the archive

    docker save -o c:\backup.tar new-image
    
  4. Delete current Docker Desktop

  5. Install desired Docker Desktop version

  6. Unpacking the image in docker

    docker load -i c:\backup.tar
    
  7. run container

    docker run --name sample-container new-image
    

Congrats, all data saved and Docker downgraded

llotall
  • 555
  • 5
  • 11
0

So, I run the installer of the previous Docker Desktop version: 2.2.0.5 - got a warning message stating that a newer Docker already exists and if I wanted to replace it (stop, or keep it both). I selected 'Replace'. The installation went successful. But when I open Docker all my running containers were gone. I run lando to recreate my Drupal 7 site. I got the "Boomshakala" from lando confirming that the app has started up correctly, and provided with its corresponding vitals -including the APPSERVER URLS. But when I access the URL, I got an error message: "Error: the website encounter an unexpected error. Please try again later." The uncaught exception thrown in shutdown function: "PDOException: SQLSTATE[]: Base table or view not found:1146 Table 'drupal7.semaphore' doesn't exist...."

To solve this, I imported and old copy of the drupal database site: lando db-import .sql

then I navigated to the docroot folder, and run a database update: lando drush upddatedb

All good now; thanks @halfer for your comments!

user3891775
  • 1,121
  • 2
  • 9
  • 13
0

The quick hack here for Lando specifically, is just to reinstall Lando from the installer for the version you want. We've bundled the supported version of Docker Desktop with Lando itself which means you can always specifically install the supported version when installing Lando. This may wipe out your containers and volumes, so be careful!