×
Change default installation Path for docker folder
Blog Containers

change default installation Path for docker folder

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.

change default installation path for docker folder

 

  • Also, we can find the default path of docker folder using below command.

docker info

change default installation path for docker folder

 

  • Stop the docker service using the stop-service command.

stop-service docker

change default installation path for docker folder

 

  • 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

change default installation path for docker folder

 

  • 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

change default installation path for docker folder

 

  • Create a folder in E:\ drive using below command.

New-Item -ItemType directory -Path e: -Name Docker

change default installation path for docker folder

 

CHANGING THE DEFAULT FOLDER PATH

  • Start the docker service using below command.

start-service docker

change default installation path for docker folder

 

  • Service has started without any errors. Run docker info command to view the default folder path.

change default installation path for docker folder

  • 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.

One thought on “change default installation Path for docker folder”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.