Mohsen Jalalian
Mohsen Jalalian

Reputation: 1130

how to change docker registry default from docker.io to another address in centos

I want to change my docker registry address from docker.io to another remote server . I want to change in in my docker service config file . in ubuntu it is in this file

/etc/systemd/system/multi-user.target.wants/docker.service

and the parameter is

ExecStart=/usr/bin/dockerd --registry-mirror=exampleurl

but i do not khow how can i change it in centos 6

Upvotes: 1

Views: 2488

Answers (2)

Ajay
Ajay

Reputation: 156

/usr/lib/systemd/system/docker.service check in this path once or else do a find sudo find / -iname docker.service and edit the file.

Upvotes: 1

hek2mgl
hek2mgl

Reputation: 158250

You can add it to DOCKER_OPTS in /etc/default/docker. That file will get sourced by /etc/init.d/docker.

Upvotes: 1

Related Questions