user3891775
user3891775

Reputation: 1563

Can I roll back to a previous version of Docker Desktop?

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.

Upvotes: 63

Views: 135247

Answers (7)

user2314737
user2314737

Reputation: 29407

As suggested in another answer, you can download older release of Docker Desktop for Mac from the Docker Desktop release notes.

Albeit downloads from the release notes only go back 6 months. For older releases, refer to this gist providing direct links to archive.org (from 4.0.0 released 2021-08-31 to 4.22.1 released 2023-08-24) or look yourself in the archives https://web.archive.org/.../https://docs.docker.com/desktop/release-notes/.

Upvotes: 0

Thomas Peet
Thomas Peet

Reputation: 433

  • Download a previous version from Release Notes
  • Open a terminal where the installer was downloaded and execute .\DockerDesktopInstaller.exe install --disable-version-check

This works for 4.X and above according to https://nickjanetakis.com/blog/docker-tip-92-rolling-back-to-a-previous-docker-desktop-version. I had problems with 4.23 and 4.24 by the way.

Upvotes: 32

Dustin LeBlanc
Dustin LeBlanc

Reputation: 36

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!

Upvotes: 0

llotall
llotall

Reputation: 635

[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 😃

Upvotes: 3

Toby Smith
Toby Smith

Reputation: 71

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.

Upvotes: 7

Niel de Wet
Niel de Wet

Reputation: 8408

  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.

Upvotes: 89

user3891775
user3891775

Reputation: 1563

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!

Upvotes: 0

Related Questions