kitematic icon indicating copy to clipboard operation
kitematic copied to clipboard

i need root permissions to changing mirror..

Open jik1992 opened this issue 11 years ago • 6 comments

Hi, i can't link official registry.hub. because of GFW.. and i own one mirror link to replace it. but in docker cli , don't know password..

echo "DOCKER_OPTS=\"\$DOCKER_OPTS --registry-mirror=http://xxxx.m.daocloud.io\"" | sudo tee -a /etc/default/docker
sudo service docker restart

i need sudo permissions .. so where i can know vm password on root

jik1992 avatar Jun 26 '15 07:06 jik1992

If you already have access to the kitematic vm then all you need to do is type sudo su for a root shell and it doesn't prompt for a password.

docker@kitematic:/etc/default$ echo "DOCKER_OPTS="$DOCKER_OPTS --registry-mirror=http://xxxx.m.daocloud.io"" | sudo tee -a /etc/default/docker DOCKER_OPTS="$DOCKER_OPTS --registry-mirror=http://xxxx.m.daocloud.io" docker@kitematic:/etc/default$ ls -l docker -rw-r--r-- 1 root root 71 Jun 26 08:54 docker docker@kitematic:/etc/default$ cat docker DOCKER_OPTS="$DOCKER_OPTS --registry-mirror=http://xxxx.m.daocloud.io" docker@kitematic:/etc/default$

leafmulch avatar Jun 26 '15 08:06 leafmulch

you are right.. be careless, we need docker-machine ssh dev to link boot2docker.

😅

jik1992 avatar Jun 26 '15 10:06 jik1992

Sorry - I don't understand if that helped or... You can list the kitematic vm if you go to the docker cli (bottom left) and run docker-machine ls. I had some headaches myself when I installed kitematic, as I already had boot2docker and docker-machine installed the latter of which seemed to conflict.

leafmulch avatar Jun 26 '15 11:06 leafmulch

This is a boot2docker issue not Kitematic, so I'm closing this for now :smiley:

The vm password should be tcuser as per this.

jmorganca avatar Jul 02 '15 01:07 jmorganca

HI @jik1992 . I'm DaoCloud's enginner. Very glad to see you are using DaoCloud Mirror. Now, we has a solution to config mirror in kitematic at DaoCloud Dashboard

Or. You can use this script to config mirror.

docker-machine ssh dev
sudo sed -i "s|EXTRA_ARGS='|EXTRA_ARGS='--registry-mirror=http://[your-mirror].m.daocloud.io |g" /var/lib/boot2docker/profile
exit
docker-machine restart dev

yank1 avatar Jul 17 '15 06:07 yank1

@yank1 :+1:

mckelvin avatar Aug 27 '15 15:08 mckelvin