Change default installation Path for docker folder
In this blog, we will show you how to change default installation path for docker folder using daemon file
- Windows docker should be installed in windows 2016 container host.
DAEMON FILE CREATION
- By default, docker will be installed in c:\programdata\docker folder.
- Also, we can find the default path of docker folder using below command.
- Stop the docker service using the stop-service command.
- Go-to PowerShell and type the below command to create a new file named daemon.json under C:\programdata\docker\config folder.
New-Item -ItemType file -Name daemon.json -Path c:\programdata\docker\config
- Open the daemon.json and add the below content.
Note : In this demonstration, we are moving docker folder from C:\ to E:\ drive
- Create a folder in E:\ drive using below command.
New-Item -ItemType directory -Path e: -Name Docker
CHANGING THE DEFAULT FOLDER PATH
- Start the docker service using below command.
- Service has started without any errors. Run docker info command to view the default folder path.
- The default folder has changed to E: drive now.
Thanks for reading this blog. We hope it was useful for you to learn how to change the default docker location in windows 2016.