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

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.

Download your desired version from the Release Notes.
Open the download, drag "Docker" to "Applications"
Chose to "Replace" the existing installation
Run Docker desktop
All your previous containers should still be there.

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.

[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:
Get a list of containers
docker container ls
Commit the container to save the data:
docker commit -p 64bf7c9f7122 new-image
where 64bf7c9f7122 - id of my container
new-image - new image name
Save the committed image with changes to the archive
docker save -o c:\backup.tar new-image
Delete current Docker Desktop
Install desired Docker Desktop version
Unpacking the image in docker
docker load -i c:\backup.tar
run container
docker run --name sample-container new-image
Congrats, all data saved and Docker downgraded 😃

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!

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!

Related

How can I resolve "unexpected EOF" error when pulling docker image

I have Docker Desktop 4.16.2 (95914) on MacOS Ventura 13.1, and as far as I know I'm not connected to any proxies. I've authenticated to docker hub via docker desktop, and have tried to pull a python base image by running "docker build .", with the following line at the top of the Dockerfile:
FROM python:3
I get the following error:
Get "https://registry-1.docker.io/v2/": unexpected EOF
Does anyone know what might be causing this and how to resolve it?
I pinned down the issue to privileges changes since Docker Desktop 4.15.0 for Mac.
What fixed the issue on my end was to downgrade to 4.14.1:
Uninstall Docker completely. This can be done by opening Docker Desktop UI, clicking the Bug icon and clicking "Uninstall". Then, the application can be moved to the bin.
Install Docker Desktop 4.14.1
I encountered this issue on a company Mac where I suspect the Privileges app I need to use to elevate permissions doesn't work well with the privileges changes Docker made starting from 4.15.0.
Extract from their 4.15.0 changelog:
Docker Desktop for Mac no longer needs to install the privileged helper process com.docker.vmnetd on install or on the first run. For more information see Permission requirements for Mac.

Docker not starting on Windows 11 with WSL 2

I'm trying to setup docker with WSL 2 to run a Dockerfile. I downloaded Docker Desktop, and when I tried to follow the quick start guide, I got the following error:
docker: error during connect: This error may indicate that the docker daemon is not running.: Post "http://%2F%2F.%2Fpipe%d2Fdocker_engine/v1.24/containers/create?name=repo": open //./pipe/docker_enginer: The system cannot find the file specified.
I set com.docker.service to run in the Task Manager, and have run:
“c:\Program Files\Docker\Docker\DockerCli.exe” -SwitchDaemon
I have also quit Docker Desktop and reopened it in admin mode, and I still get the message that Docker Desktop has stopped.
Please let me know if there's any other options, thanks!
I managed to solve the problem in this way:
delete config file AppData/Roaming/Docker/settings.json
start Docker Desktop (it will create new default settings.json)
You need to re-configure settings, so it is also good idea to save the old settings.json and compare settings with the new one.
If you are running Docker Desktop for Windows 4.5.0 then you should be aware of an existing issue where the default backend selected after installing is not the correct one.
You can switch to the correct backend manually by editing the file located at: %AppData%\Docker\settings.json (full path: C:\Users\%UserName%\AppData\Roaming\Docker\settings.json) and at the bottom of the file change the value for the wslEngineEnabled field to true. After that Docker Desktop should start correctly.
Similar issue and solution is mentioned here by the user mccaa25.
latest version 4.5.0 It won't work for me too, for me downgrade to 4.4.4 it worked. It may be problem with the latest version
for released note and older version Here
Note: You can install an older version and update to latest version 4.5.0
Wow! I spent multiple days trying to get Docker for windows 11 to work. What finally did it was downgrading to version 4.4.4 as #GinglrBell recommended. Here's a link Docker version 4.4.4.
Make sure WSL is installed and virtualization is enabled. If you try to open WSL and you get an error telling you to enable virtualization in BIOS, run this command as Admin in powershell: bcdedit /set hypervisorlaunchtype auto (Docker src). Then restart your PC.
I hit this issue today, and the steps below are what worked for me - the gist is that I needed to install WSL 2 beforehand. Most of my steps were derived from here:
open powershell as admin
wsl -l -v # Windows Subsystem for Linux has no installed distributions
install linux kernel update from here # in my case, x64-based
wsl --set-default-version 2
wsl --list --online # shows several linux distributions, I picked a recent one
wsl --install -d Ubuntu-20.04 # then create default linux user name and password
install windows docker desktop from here # now starts successfully
Manged to switch to Windows Containers. (Docker v4.9.0)
What I did was to change the following in the settings.json:
"useWindowsContainers": true,
"wslEngineEnabled": true,
Also set security on folder:
C:\ProgramData\Docker (I set "Everyone" full control.)
After that I used the "Switch to Windows Containers"-feature from the task-bar icon content menu
I tried Janne Rantala's method.
But the same problem occurs again after several days.
My final solution is to uninstall Docker Desktop, then download and run the installation file as an administrator.
Then the problem no longer appears again.
I was able to resolve this issue on my machine by installing the Linux kernel update package as described in the Microsoft guide
I have been having some Docker setting up troubles for a fair amount of time. I think I had to just make sure I removed all references of Docker. After buying Windows 10 pro I still had issues, I did have to look into the following folders:
C:\Users\%UserName%\AppData\Local\Temp\Docker
C:\Users\%UserName%\AppData\Roaming\Docker
I also deleted the Docker file in my programfiles folder
Navigated to said file and deleted Docker files.
Used the docker installer, checkboxes (to use wsl2).
I was faicing the same issue and resolved. I have just open Microsoft Store application and after that opened the docker and its working fine. This is wired but sharing this so it might helps someone.
I solved this issue by enabling the windows feature "Windows Hypervisor Platform" and restarting my computer.
I installed Docker Desktop v4.16.2

Is there a way to fix or reinstall Docker Desktop after deleting files in the Docker directory?

I am new to Docker (just about a week) and am trying to get Docker Desktop 3.3.1 to work. I foolishly deleted some files in the Docker directory, and now cannot uninstall the application. I have stopped it and unregistered it using wsl, but when I go to the Apps & features Settings window and click Uninstall, it just hangs with a blank Uninstall window.
However, when I try to reinstall Docker Desktop 3.3.1, I get the following message: "Existing installation is up to date" but still see the empty C:\Program Files\Docker\Docker directory.
I tried to delete the registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Docker Desktop but I get *"Cannot delete Docker Desktop: Error while deleting key."
Is there a "fix" I can download to repair this installation, or is there a way to keep the uninstallation from "hanging"? Since I can't do anything with Docker Desktop until this is fixed, I am using Docker for Windows. I am not sure that Docker for Windows has the capabilities and features I need. I would appreciate any help I can get.
There was a key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall called “Docker for Windows.” I deleted it and all of its sub-keys and the installation then went to completion.

Docker is always show "Docker Engine starting..."

Hello I got new existing projects and using docker.
The problem is my docker desktop app always in Docker Engine starting..., but in my icon it's already show Docker Desktop is running.
running on windows 10🙏
Just close docker desktop app and then open it up again, it will run normally again
Had the same issue running Docker Desktop 3.2.2.
Fixed by downloading Docker Desktop 3.3.0 (https://docs.docker.com/docker-for-windows/release-notes/)
In some cases the following method works:
open cmd as admin
enter net stop winnat
start or restart docker desktop
enter net start winnat
Here is my solution.
Run the following two lines of commands inside PowerShell.
First Exit docker hub desktop, then run these commands in PowerShell:
wsl --unregister docker-desktop
wsl --unregister docker-desktop-data
Note: It should be noted that this removes all docker containers and data. (WLS: Unregisters the distribution and deletes the root filesystem.)
Suddennly i opened my laptop and started Docker, it was displaying only "Docker desktop starting" and stuck here for long time. I tried to delete settings.json(auto created on starting docker again) at \AppData\Roaming\Docker
but nothing worked.
So, i simply restarted my laptop undoing all changes, and this time after few mins Docker desktop started successfully.
When I check, I was using the latest version so downgrade the Desktop version 4 to version 3.
https://docs.docker.com/desktop/previous-versions/3.x-windows/
summary - Try with a different version other than the latest one.
Hope this helps !!!
version 4.16.2 must be updated immediately to 4.16.3
open update to latest window and read the update cause:
Fixed Docker Desktop failing to start...
It couldn't be updated, so uninstall and install it again.
Rebooting fixed the issue for me.

How do I uninstall Docker or remove the Docker directory?

I am trying to learn Docker and have installed it on my laptop. I have tried to uninstall it and delete the Docker directory as Administrator, but keep getting the error message "The action cannot be completed because the file is open in Docker Desktop service". But Docker Desktop Service is not open, and does not appear whenever I open Task Manager. When I try to reinstall Docker, it says it it up to date, when clearly it is not. I would appreciate any help getting a fresh installation of Docker.
Here is the Docker directory C:\Program Files\Docker\Docker.
Here is the error message.
If you have access to the windows machine, through UI, you can:
Go to Start -> Services, and search for the Docker (probably is called Docker Desktop or something similar) service and
Manually Stop. You can also set the service to start Manually, not Automatically, give a restart and
Now Docker is completely stopped and
You can uninstall safely.
User azbarcea answered the question.

Resources