boot2docker / docker-machine / Docker工具箱上的Docker守护程序配置文件 [英] Docker daemon config file on boot2docker / docker-machine / Docker Toolbox

查看:364
本文介绍了boot2docker / docker-machine / Docker工具箱上的Docker守护程序配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在哪里可以在boot2docker机器上找到docker daemon配置文件?



根据此主题: Dockerfile:Docker build无法下载软件包:centos-> yum,debian / ubuntu-> apt-get behind intranet



我想在 DOCKER_OPTS 中设置'--dns',但是我找不到这个配置文件在 / etc / code>或其他任何地方。

解决方案

内部boot2docker( boot2docker ssh )/ docker-machine( docker-machine ssh default ),打开或创建文件 / var / lib / boot2docker / profile 并添加以下行:

  EXTRA_ARGS = -  dns 192.168.1.145

也适用于:

  EXTRA_ARGS = -  insecure-registry myinternaldocker

更改后,您需要重新启动docker守护程序: / p>

  sudo /etc/init.d/docker restart 

或者离开boot2docker / docker-machine并重新启动整个虚拟机:

  boot2docker restart 
#机器
docker-machine restart默认

取自以下信息:https://groups.google.com/d/msg/docker-user/04pAX57WQ7g/_LI-z8iknxYJ



关心


Where can I find docker daemon config file on boot2docker machine?

According to this topic: Dockerfile: Docker build can't download packages: centos->yum, debian/ubuntu->apt-get behind intranet

I want to set '--dns' in DOCKER_OPTS, but I can't find this config file either at /etc/default or anywhere else.

解决方案

Inside boot2docker (boot2docker ssh) / docker-machine (docker-machine ssh default) , open or create the file /var/lib/boot2docker/profile and add the following line:

EXTRA_ARGS="--dns 192.168.1.145"

Also works for:

EXTRA_ARGS="--insecure-registry myinternaldocker"

After the change you need to restart the docker daemon:

sudo /etc/init.d/docker restart

Or leave boot2docker / docker-machine and restart the entire virtual machine:

boot2docker restart
# for docker machine
docker-machine restart default

Information taken from: https://groups.google.com/d/msg/docker-user/04pAX57WQ7g/_LI-z8iknxYJ

Regards

这篇关于boot2docker / docker-machine / Docker工具箱上的Docker守护程序配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆