in some physical machine docker-pull dc-centos:7 Error: pull image from local repository Error response from daemon: Get https://172.168.131.2:5001/v2/: Forbidden
add insecure-registries into /etc/docker/daemon.json
Signed-off-by: Xiao Shenwei xiaoshenwei96@163.com --- sparrow/0-package/common | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sparrow/0-package/common b/sparrow/0-package/common index 05becdf..2c7de37 100755 --- a/sparrow/0-package/common +++ b/sparrow/0-package/common @@ -24,6 +24,8 @@ cat >> /etc/modules-load.d/cifs <<EOF cifs EOF
+: ${DOCKER_REGISTRY_HOST:="127.0.0.1"} +: ${DOCKER_REGISTRY_PORT:=5001} cat > /etc/docker/daemon.json <<EOF { "log-driver": "fluentd", @@ -31,7 +33,8 @@ cat > /etc/docker/daemon.json <<EOF "fluentd-address": "localhost:24224", "fluentd-async-connect": "true", "tag": "{{.Name}}" - } + }, + "insecure-registries": ["$DOCKER_REGISTRY_HOST:$DOCKER_REGISTRY_PORT"] } EOF