How do I install Docker using Chocolatey?
Asked Answered
H

2

12

I ran

choco install docker-cli
choco install docker-machine
choco install docker-compose
choco install docker-desktop

I tried to test the installation according to the documentation, but got an error.

https://docs.docker.com/get-started/#test-docker-version

# docker --version
Docker version 19.03.1, build 74b1e89

# docker version
Client: Docker Engine - Community
 Version:           19.03.1
 API version:       1.40
 Go version:        go1.12.5
 Git commit:        74b1e89
 Built:             Thu Jul 25 21:17:08 2019
 OS/Arch:           windows/amd64
 Experimental:      false
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

# docker info
Client:
 Debug Mode: false

Server:
ERROR: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
errors pretty printing info

I looked at this question but none of the answers were useful: docker cannot start on windows

I'm using Windows 10.

windows 10 version

Reference: https://chocolatey.org/search?q=docker


I also downloaded an ran the installer directly from Docker.com.

https://hub.docker.com/editions/community/docker-ce-desktop-windows

It only said the existing installation is up to date and exited. There is no whale icon in the system tray.

docker desktop


From Task Manager > Performance > CPU showing virtualization is enabled:

task manager virtualization

Harlow answered 3/8, 2019 at 2:29 Comment(3)
Do you receive the same error if you try to run docker as Administrator?Heartfelt
@Heartfelt I am running Docker as Administrator. ConEmu uses # as a way to indicate it is running in an Administrator elevated command shell. I also ran the download from Docker.com as Administrator.Harlow
After several reboots and updates it is working now. Nothing mentioned restarting, not that it should be necessary.Harlow
N
10

There are definitely different ways to install Docker on Windows using Chocolatey, and rather than repeat all of the content here, I would recommend that you take a look at this blog post from Stefan Scherer:

https://stefanscherer.github.io/how-to-install-docker-the-chocolatey-way/

He works for Docker, and he is also a long term user of Chocolatey, and hopefully this blog post will help you get underway.

To summarize though, his TL/DR:

The best experience with Docker on a Windows 10 machine is using the Docker Desktop product. Try to grab an up-to-date Windows 10 Pro machine to be all set for it and then run

choco install docker-desktop
Nevanevada answered 5/8, 2019 at 7:6 Comment(4)
That was the 4th line in my question. I did install docker-desktop.Harlow
Yes, it is, however, the suggestion in that article is to "only" install that one thing. You have installed a number of other packages, that aren't really intended to be used together (at least that is my understanding). I would suggest "only" installing that one package.Nevanevada
Also note docker-desktop currently only supports Win10 Enterprise. If you have Win10Home, Win7, or if you use VirtualBox VMs then install docker-toolbox per same article. If reading this after today please read article for latest :-).Stockinet
As of today, it looks like Docker Desktop itself thinks that 2.5.0.1 (49550) is available, yet if I run choco upgrade docker-desktop it says "docker-desktop v2.4.0.0 is the latest version available based on your source(s)." It is expected that Chocolatey lags the official release ? Looks like these releases are "waiting for maintainer" chocolatey.org/packages/docker-desktop#versionhistoryAppellate
T
2

You'll have to start the program from the start-menu (at least once) to activate and configure the daemon.

enter image description here

Toussaint answered 17/9, 2019 at 11:7 Comment(2)
I did but it still didn't work. "It only said the existing installation is up to date and exited."Harlow
@riezebosh Can you please add the path of the program to activate and configure the daemon to your answer ?Uprise

© 2022 - 2024 — McMap. All rights reserved.