问题标签 [boot2docker]

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 投票
2 回答
1413 浏览

docker - 在 docker 上部署 nodejs

我正在尝试将示例节点 js 应用程序部署到 docker。

我正在学习 http://oskarhane.com/create-a-nodejs-docker-io-image/的教程。

在教程中,有第 4 步:作者要求用代码修改 app.js 并放置在 /app/www/app.js 但我的问题是当我做 winscp 时,我找不到文件夹 /www在 /var 中。我真的被困在了这个地方。

谁能告诉我如何用服务器代码修改js文件app.js?或者任何更简单的逐步方法可以在 ubuntu 12.04 docker 上部署任何应用程序,请告诉我。

0 投票
5 回答
8693 浏览

docker - Obtaining the ip address of a docker container

I have a ubuntu machine which is a VM where I have installed docker in it. I am using this machine from my local windows machine and doing ssh , opening the terminal to the ubuntu machine.

Now , I am going to take a docker image which contains all the necessary softwares for eg: apache installed in it. Later I am going to deploy a sample appication(which is a web applicationP on to it and save it .

Now , I am in a confused mode as in how to check the deployed application if its running properly. i.e., what would be the address of the container which containds the deployed application. for eg:- If I type http://127.x.x.x which is the address of the ubuntu machine , I am just getting time out .

Can anyone tell me how to verify the deployed application . Also, the printing the output of the program on the console works seemlessly fine , as the output gets printed , only thing I have some doubts is regarding the web application.

0 投票
1 回答
21897 浏览

postgresql - Docker 启动容器抛出无法分配请求的地址错误

我在 MAC OS 主机上配置了一个 ubuntu 12.04 虚拟机。Docker 在 ubuntu 上

我的以太网配置(桥接适配器)是

当我尝试启动 postgresql 容器时,出现以下错误。

0 投票
1 回答
3078 浏览

vagrant - 如何从 Vagrant VM 中访问 Docker 容器

我有一个提供两个 Docker 容器的 Vagrant 设置。Docker 容器启动没有问题。在 Vagrant VM 中,我可以运行docker ps并查看连接到正确端口的两个容器。如果我运行docker logs XXX,我会看到我的 Redis 和 Mongo 守护程序都在运行。但是从 Vagrant 盒子本身我无法远程登录或访问任何一个正在运行的服务。我总是被拒绝连接。如何让 Vagrant VM 看到 Docker 中运行的服务?

我的Vagrantfile样子:

0 投票
2 回答
1016 浏览

docker - Docker - 服务器命中 EOF

我刚刚在 Mavericks 上安装了 docker 和 boot2docker。我照常做

它说服务器已启动并正在运行。但是当我尝试连接时(例如docker info)我得到

我猜守护进程出了点问题,但我无法破解这个...有谁知道它可能是什么?

注意:我在安装 docker/boot2docker 时没有安装 VirtualBox 的捆绑副本,因为我已经安装了它。会不会有什么遗漏?

0 投票
1 回答
566 浏览

vagrant - Vagrant + docker 错误

我正在使用带有 phusion/baseimage 的 Vagrant 1.6.3 作为 docker 提供程序来使用 Docker。但我一直遇到这个错误:

以下 SSH 命令以非零退出状态响应。Vagrant 假设这意味着命令失败!

ssh -i /tmp/key_e8ffa02d35af2bec7aab60fe7e9df4db_0c30703c7b7126cdf4832a41b85627e5 -o 压缩=yes -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p22 root@172.17.0.2's

谁能帮我吗?谢谢。

0 投票
1 回答
704 浏览

docker - 无法在 Mac 上使用 Docker 安装包

今天早上我开始玩 Docker,所以安装boot2docker在我的 Mac 上。

一切似乎都进展顺利,遵循使用 Docker 图像文档,直到我尝试创建一个 Dockerfile 来安装 ruby​​ gem。

我花了很长时间将头撞在墙上,为什么它无法连接以安装宝石......然后我最终解决了这个问题,所以在这里添加这个以防其他人将来遇到这个问题,因为没有谷歌上没有任何关于它的信息。

0 投票
3 回答
92 浏览

docker - 在 docker 客户端中使用最后一个容器名称作为默认值

docker 客户端docker ps具有非常有用的标志-l,它显示最近运行的容器信息。但是,所有其他 docker 命令都需要提供CONTAINER IDNAME

有什么好技巧可以调用:

代替:

0 投票
2 回答
724 浏览

docker - 解决 Docker 容器网络问题的最佳方法

我在 OSX 上使用 boot2docker 来使用 Docker。我发现我创建的容器有时无法连接到archive.ubuntu.comping google.com. 不过我可以ping 8.8.8.8

解决容器网络问题的最佳方法是什么?

0 投票
6 回答
17336 浏览

windows - 如何将 Dockerfile 和应用程序文件部署到 boot2docker

我刚刚开始学习 Docker,我正在尝试在 Windows 上使用 boot2docker 进行简单的设置。我无法在任何在线教程或示例中找到如何让 boot2docker VM 可以访问我的项目文件。

我下载了 boot2docker,并成功安装并启动并运行。我也可以通过 ssh 进入它并运行 hello world docker 示例,所以我知道我在 VM 中安装了一个有效的 Docker。

现在,问题是:如何Dockerfile在 boot2docker VM 上获取我和我的应用程序文件,以便构建 Docker 容器?

换句话说,我正在尝试从 boot2docker VM 执行此操作:

我尝试按照https://github.com/boot2docker/boot2docker#folder-sharing上的说明设置 SAMBA 共享,我可以成功地从 Windows 连接到共享,\\192.168.59.103\data但这并没有告诉我如何访问相同的boot2docker 虚拟机中的目录。

我觉得答案可能很明显,但我敢肯定我不是唯一一个会撞到那堵墙的人。谢谢你的帮助!


更新 - 现在内置在 boot2docker 1.3 中!

从 boot2docker 1.3 开始,添加了挂载共享文件夹的功能,因此 VM 可以直接共享您的 dev 文件夹。更多信息:https ://github.com/boot2docker/boot2docker#virtualbox-guest-additions