Docker for mac on machine that previously had boot2docker installed complains about TLS configuration - docker

I took an older macbook back in use. It previously had boot2docker installed when the native docker for mac didn't exist yet. That might be the root cause of my issue.
I've installed the new docker for mac but when I run docker-compose I've got the following error:
docker.errors.TLSParameterError: Path to a certificate and key files must be provided through the client_config param. TLS configurations should map the Docker CLI client configurations. See https://docs.docker.com/engine/articles/https/ for API details.
I don't want to install a docker machine with virtual box or anything. I just want to run it natively like a fresh docker for mac installation. All the solutions I've found so far require me to use a docker-machine.

Fixed it by unsetting all legacy docker machine environment variables so that it uses the correct docker commands
unset ${!DOCKER_*}
I've found the solution on the docker troubleshooting page over here.

Related

visual-studio-code : failed to connect. is docker installed?

my environment :
MacOS M1 chip
VSCode version 1.66.2 arm64
local installed docker version : 20.10.22
I have situations that docker is not working in VSCode.
I already installed docker in local. But when I'm trying to connect docker in VSCode, repeatedly asking install docker extensions. (but I do have docker already ). and if I do reinstall with following the VSCode, the docker version was broken (changed to intel chip docker).
Does anybody know what's wrong?
Docker Extensions for VS Code have nothing to do with the Docker engine itself. They are like an additional layer of tools and commands over the installed Docker. E.g. they provide IntelliSense for editing Docker-related files, you can run Docker commands from F1 drop-down, etc. But you should be able to do all the required tasks even without Docker Extensions, e.g. from the Terminal in VS Code, but for this the path to Docker CLI (command line interface) should be added to PATH environment variable.
If you are getting failed to connect error then maybe Docker engine is not running. Please refer to https://docs.docker.com/desktop/install/mac-install/ and https://docs.docker.com/desktop/troubleshoot/overview/ about how to check if the engine is running and how to troubleshoot the issues.
If that doesn't help, please provide some specific error and steps, which led to it, then we'll try to find out.

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

Remote-Containers Extension of VS Code not able to execute docker commands

Setup:
Ubuntu 20.04 distro running inside WSL2 (5.4.72-microsoft-standard-WSL2)
VS Code version 1.55.2 installed in Windows
Docker version 19.03.8, build afacb8b7f0 installed in WSL2
docker-compose version 1.29.0, build 07737305 installed in WSL2
Remote-Containers Extension for VS Code v0.166.1 installed locally (I could not find an option to explicitly install this inside WSL2, but I am not sure if this even matters, see below)
Original error:
When I open the command palette and enter Remote-Containers: Rebuild and Reopen in Container, I get the error `The 'docker' command was not found. Make sure Docker is installed' in a pop up window.
What I tried:
Attempt 1
First, I thought that the Remote-Containers extension wants to execute the docker commands inside windows and not WSL2. Since I don't have Docker Desktop installed on Windows, it is impossible to execute docker commands in Windows. So I tried downloading a specific version of the the Remote-Containers extension file from the marketplace v0.165.0 I believe, copying it into the VS extension folder inside WSL2 /home/kevinsuedmersen/.vscode-server/extensions and installing it manually from the VS Code Extension panel. However, this also installed the Remote-Containers extension locally, so probably on Windows. I am not sure if locally means that this extension is available globally, but nevertheless, I am still getting the error that the docker command is not found as explained above.
Attempt 2
I notice that when I open a PowerShell on Windows, I can use the docker daemon inside WSL2 by prepending wsl to all docker commands, e.g. wsl docker run hello-world. So, I went to the VS Code and in settings (Settings > Remote > Containers > Docker Path), I changed the docker path from docker to wsl docker, but then, I got this error Docker Desktop WSL 2 backend required. This is even the case on another laptop, where I actually have Docker Desktop installed and the WSL2 backend enabled.
Attempt 3
I tried changing the docker path in VS code to the full path of the docker socket in WSL2 /var/run/docker.sock, but then I got the error Current user does not have permission to run 'docker'. Try adding the user to the 'docker' group. My current user kevinsuedmersen is already member of the docker group.
Any advice or directions are greatly appreciated.
Answer was given on the GitHub Repo of the VS-Remote-Container Extension here: https://github.com/microsoft/vscode-remote-release/issues/4914

'docker" command cannot be found in this WSL1 distro

While attempting to install, in VS Code, the Fabric samples and binaries through the curl command :
I've encountered the following error, as soon as Fabric docker images are pulled :
The command 'docker' could not be found in this WSL1 distro. We recommend to convert this distro into
WSL 2 and activate the WSL integration in Docker Desktop settings.
N.B: Docker version 20.10.0-beta1
Thus any relevant feedback, not impacting the usage of the IBM Blockchain Platform v.1.0.39 (e.g. prerequisites installed), would highly be appreciated.
Best
See the Docker Desktop WSL 2 backend guide.
Specifically, you need to convert your Ubuntu distribution to WSL2 (it is currently WSL1). To do so, see Step 6 in the Install section:
To upgrade your existing Linux distro to v2, run:
wsl.exe --set-version Ubuntu 2
Either that, or create a new WSL instance by backing up the WSL1 version (wsl --export) and then importing it into a new copy (wsl --import). See wsl --help for the parameters needed.
Then proceed with the rest of the Docker installation instructions.
in my case, resolved by enabling the WSL2 distro option in the docker settings.
As the log says (in your qusetion)
We recommend to convert this distro into WSL 2 and activate the WSL integration in Docker Desktop settings.
in Docker Settings
go Resources
go WSL INTEGRATION
check Enable integration with my default WSL distro
Apply & Restart
I faced the same issue and solved it by navigating to: docker desktop > Resources > wsl integration then choose the right distro for integrating docker with.

Docker - server hitting EOF

I just installed docker and boot2docker on Mavericks. I did the usual
boot2docker init
boot2docker start
export DOCKER_HOST=tcp://localhost:4243
and it says the server is up and running. But when I try to connect (e.g. docker info) I get
2014/06/07 10:45:55 Get http://localhost:4243/v1.11/info: EOF
I'm guessing something is wrong with the daemon but I can't crack this one... Does anyone know what it could be?
Note: I didn't install the bundled copy of VirtualBox when I installed docker/boot2docker because I already had it installed. Could there be something missing from that?
https://github.com/boot2docker/boot2docker/releases/tag/v0.12.0
Note: this update changes the exposed Docker port from 4243 to 2375,
and will require the v0.12.0 version of the new boot2docker management tool.
This Boot2Docker release is not backwards compatible with older management tools
I have the same problem, but couldn't really use boot2docker v0.12.0 yet.
I just install boot2docker using Go directly go get github.com/boot2docker/boot2docker-cli

Resources