Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set docker_opts on windows

Tags:

docker

I want to use the third-party's images and book says that I should add the configuration --insecure-registry=hub.ghostcloud.cn to Docker_OPTS under /etc/default/docker.

I am using the windows7 64bit and docker is installed by using docker toolbox. But I cannot find the /etc/default/docker file.

So where is the file's directroy? And how can I set the Docker_OPTS to use third-party's images on windows? Thank you.

like image 878
gaoxinge Avatar asked Jun 22 '16 01:06

gaoxinge


1 Answers

In Windows, Docker runs inside a VM. So, you have to ssh into the VM and make the changes. To ssh into the VM (assuming default is the VM name you have created using Docker toolbox), enter the following command in the Docker Quickstart Terminal,

docker-machine ssh default

Once you ssh into the VM, then look into the file /var/lib/boot2docker/profile, and you will find the "DOCKER_OPTS=...". Just add --insecure-registry=hub.ghostcloud.cn to that. You are all set.

In case, if you have trouble in using cd command to enter into /var/lib/boot2docker directory, you may want change yourself as a sudo user. Execute the following command,

sudo -i
like image 66
techtabu Avatar answered Oct 30 '22 17:10

techtabu