问题标签 [docker-machine]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
8311 浏览

docker - 如何使用 docker-machine 和 VirtualBox 创建具有特定 URL 的 docker 机器?

我可以使用 VirtualBox 驱动程序创建一个 Docker 实例,但我不知道如何指定 URL。

创建命令:

码头机器 ls:

我希望 URL 是特定的 URL。如何强制 Docker 实例使用特定的 URL(例如:192.168.99.113)?

详细信息:使用 Docker 工具箱的 Mac 10.10.5

更新

我尝试使用该--virtualbox-hostonly-cidr命令设置 docker 机器的 IP 范围;我指定了一个 IP 地址的范围(“192.168.99.113/32”),但创建的机器的 IP 为 192.168.99.100,超出了我提供的范围。

甚至可以设置具有特定 IP 地址的 docker 机器吗?

0 投票
4 回答
49301 浏览

docker - docker-machine boot2docker root 密码

在任何地方都没有找到答案......我使用 docker-machine 创建了一个 VM(boot2docker)。我需要使用 root 编辑一些文件。

boot2docker 中的 root 密码是什么?

0 投票
1 回答
2010 浏览

docker - yum install 不能在 boot2docker 主机上运行?

我对 Docker 比较陌生。我已经使用 docker-machine create -d 启动了一个 boot2docker 主机。

设法连接到它,并运行一些命令。都好。

然而,当试图创建一个基本的 http 服务器镜像时,基于 centos..“yum install”根本就失败了。不管是什么包。

这是我的 Docker 文件:

运行时: docker build 。

它开始构建图像,一切看起来都很好..但随后失败:

您的事务已保存,使用以下命令重新运行:yum load-transaction /tmp/yum_save_tx.2015-09-18.15-10.q5ss8m.yumtx 安全警告:您正在针对非 Windows Docker 主机从 Windows 构建 Docker 映像。添加到构建上下文的所有文件和目录都将具有“-rwxr-xr-x”权限。建议仔细检查和重置敏感文件和目录的权限。命令 '/bin/sh -c yum install httpd' 返回一个非零代码:1

知道我在做什么错吗?

提前致谢。

0 投票
2 回答
469 浏览

macos - Finding the correct network interface for VirtualBox instance spun up by docker-machine on OSX

Im trying to automate a docker run shell script that needs to spin up an X11 app running on a docker-machine VM with virtualbox driver on OSX/mac. To get the x11 app to forward the X11 display to the desktop host i need to get the ip address of the correct vboxnet* (i assume) network interface (not the docker ip) and export that ip into the docker container.

what i am currently doing is assuming that the docker-machine VM ip is tied to the "vboxnet1" interface name and regexp'ing it out of ifconfig.

i see that the virtualbox DHCP process that spins up when i start docker-machine has a trunk name that corresponds to the interface i want - but again this seems like an assumption and i would think there is some command i could run to be certain which address it is so my docker run script will work on any machine.

Is there a way to definitively determine which network interface to find the ip address?

0 投票
1 回答
98 浏览

google-compute-engine - 如何将谷歌磁盘挂载到 docker run -v

是否可以将 docker-machine 与谷歌磁盘一起使用?

我有一个通过 docker-machine 驱动程序运行的 docker-machine。然后我需要能够:docker run -v“谷歌磁盘的路径”来自终端/docker-machine?

0 投票
2 回答
1408 浏览

docker - 如何将端口限制为由 docker-machine 创建的主机?

我想创建一个只接受从某些 IP 到 5432 的连接的数据库机器。我想允许连接到这个数据库机器的其他机器没有运行 docker。我已经docker-machine使用这个 docker-compose 文件在数字海洋上部署了一个主机:

并试图只允许来自另一个特定主机的流量,如下所示:

但是,出于某种原因,我仍然可以从不需要的主机连接。知道为什么它不起作用吗?

0 投票
1 回答
1128 浏览

mongodb - 无法连接到在 docker-machine 上运行的 mongodb 实例

我对 docker 很陌生,我正在尝试从我的机​​器连接到在 docker 机器上运行的 mongo 服务器。

我启动了 docker 映像,因为它记录在官方 mongo 存储库中:

docker run --name my-mongo -d mongo

因为我在 docker-machine 上运行,所以我使用机器 ip(用 获取docker-machine ip dev)和默认的 mongo 端口并输入:

mongo --host 192.168.99.100 --port 27017

我得到了这样的回应:

从日志中我可以看到 mongo 开始得很好:

我缺少什么 - 是我的配置还是我尝试启动 mongo shell 的方式(我也尝试连接节点应用程序 - 也没有成功)。

0 投票
1 回答
669 浏览

heroku - 在 heroku docker 中运行 gunicorn

我有以下过程文件:

当我使用foreman start一切正常运行它时,但是当我使用在容器中运行它时docker-compose up web,我得到

我用来构建容器的过程在Heroku 的 docker guide中指定:

0 投票
8 回答
90193 浏览

macos - 如何增加 docker-machine 内存 Mac

我是 Docker 新手,并尝试通过本教程从 Docker 映像设置 MemSQL - http://docs.memsql.com/4.0/setup/docker/。我在 Mac 上,教程使用boot2docker的似乎已被弃用。

VM 需要 4GB 内存才能运行。本教程指定了如何执行此操作,boot2docker但我找不到使用 docker-machine/docker 工具箱执行此操作的方法。

这是我正在使用的命令,以及我只是尝试在不更改 boot2docker 配置的情况下完成教程时遇到的错误。

0 投票
2 回答
2848 浏览

windows - 在 Windows 上更改 .docker 目录

Docker 放置东西的 Windows 上的标准路径是:

我们需要把它放在这里:

我们找不到有关在何处或如何更改该设置的任何信息。任何提示表示赞赏,谢谢!