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
SYSTEM REQUIREMENT
- 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.
docker info
- Stop the docker service using the stop-service command.
stop-service docker
- 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.
{
“graph”: “E:\\Docker”
}
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.
start-service docker
- 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.
VIDEO
Thanks for reading this blog. We hope it was useful for you to learn how to change the default docker location in windows 2016.
Loges