Run dockerd.exe to start Docker daemon

Viewed 1929

I know that in order to run Docker daemon, I should stop Docker Window and run dockerd.exe in resources folder. However when I want to execute it by command prompt, I get the error below:

time="2020-09-10T15:22:48.798108400+04:30" level=info msg="Starting up"
failed to start daemon: a required service is not installed, ensure the Containers feature is 
installed: Access is denied.

can someone help me how to solve the problem or suggest other ways to run Docker daemon?

2 Answers

Download docker.exe (cli) and dockerd.exe (service) to a local folder. Add the folder to path. Add the folder to $PATH, in environment variables. in the example below C:\Docker\

https://download.docker.com/win/static/stable/x86_64/

Create a new user group under "Edit local users and group". Name is docker-users or update the Json file below. Add anyone who needs to run docker to this group.

Create a new config file daemon.json

{
                "group": "docker-users",
}

Run this in powershell as administrator

New-Service -Name Docker -BinaryPathName "C:\docker\dockerd.exe  --run-service --config-file C:\docker\daemon.json" -DisplayName "Docker Engine" -StartupType "Automatic"

Bonus: Older Docker-compose cli is available here, https://github.com/docker/compose/releases

NOTE: I had some issues with the service starting up automatically after reboot.

Admin access is needed to run Docker Service

Related