让meteor在docker + commiting中工作,然后重新运行问题

简短版本:

我基本上有一个我运行的图像,在那里我运行一个meteor应用程序。 但是当我提交这个图像,然后运行这个新的图像我的应用程序不运行。 任何人都可以build议我做错了什么? 或者我怎么能解决这个问题?

长版:

我有以下的docker图片:

docker@boot2docker:~$ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE meteor-todos 0.1 30bd0cd18781 3 days ago 840.6 MB 

在这里我正在运行我的形象:

 docker@boot2docker:~$ docker run -it --rm -p 3000:3000 meteor-todos:0.1 bash root@5c04458cc81c:/# 

在这里我创build我的meteor应用程序,我试图按照这里 :

 root@5c04458cc81c:/# ls bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var root@5c04458cc81c:/# meteor create simple-todos Created a new Meteor app in 'simple-todos'. To run your new app: cd simple-todos meteor If you are new to Meteor, try some of the learning resources here: https://www.meteor.com/learn 

它创build了简单的todos目录,所以我cd和命令meteor运行应用程序

 root@5c04458cc81c:/# ls bin boot dev etc home lib lib64 media mnt opt proc root run sbin simple-todos srv sys tmp usr var root@5c04458cc81c:/# cd simple-todos/ root@5c04458cc81c:/simple-todos# meteor [[[[[ /simple-todos ]]]]] => Started proxy. => Started MongoDB. => Started your app. => App running at: http://localhost:3000/ ^C root@5c04458cc81c:/simple-todos# 

但是,如果我退出这个容器,并将其作为图像提交。 然后运行新的图像,我不能让应用程序运行,我得到的错误。 有人帮我理解这个吗? 不知道这是一个meteor的东西,docker的东西,还是只有我和我的环境?

获取正在运行的容器的标识(使用另一个boot2dockerterminal):

 docker@boot2docker:~$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 5c04458cc81c meteor-todos:0.1 "bash" 30 minutes ago Up 30 minutes 0.0.0.0:3000->3000/tcp dreamy_yalow 

退出容器

 root@5c04458cc81c:/simple-todos# exit exit docker@boot2docker:~$ 

提交容器,这是使用docker images

 docker@boot2docker:~$ docker commit -m "meteor tut start" 5c04 meteor-todos:0.2 8442afe92d2f50ac75f2a537b69472010f2bf8c101539b3598aa5ae72c65e735 docker@boot2docker:~$ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE meteor-todos 0.2 8442afe92d2f 6 seconds ago 930 MB meteor-todos 0.1 30bd0cd18781 4 days ago 840.6 MB 

现在,如果我再次运行图像

 docker@boot2docker:~$ docker run -it --rm -p 3000:3000 meteor-todos:0.2 

我的简单todos目录仍然在那里,所以我改变导演,并运行应用程序命令meteor 。 任何人都可以告诉我这个错误?

 root@ac7d1be3b145:/# ls bin boot dev etc home lib lib64 media mnt opt proc root run sbin simple-todos srv sys tmp usr var root@ac7d1be3b145:/# cd simple-todos/ root@ac7d1be3b145:/simple-todos# meteor [[[[[ /simple-todos ]]]]] => Started proxy. => Started MongoDB. /root/.meteor/packages/meteor-tool/.1.1.9.ltydx3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245 throw(ex); ^ Error: EXDEV, rename '/simple-todos/.meteor/local/build' at Object.Future.wait (/root/.meteor/packages/meteor-tool/.1.1.9.ltydx3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:398:15) at /tools/fs/files.js:1331:28 at Object.wrapper [as rename] (/tools/fs/files.js:1334:20) at Object.files.renameDirAlmostAtomically (/tools/fs/files.js:812:11) at Builder.complete (/tools/isobuild/builder.js:571:13) at /tools/isobuild/bundler.js:1913:13 at /tools/isobuild/bundler.js:1930:7 at /tools/isobuild/bundler.js:2205:22 at /tools/utils/buildmessage.js:268:13 at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14) at /tools/utils/buildmessage.js:261:29 at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14) at /tools/utils/buildmessage.js:259:18 at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14) at /tools/utils/buildmessage.js:250:23 at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14) at Object.capture (/tools/utils/buildmessage.js:249:19) at Object.exports.bundle (/tools/isobuild/bundler.js:2047:31) at /tools/runners/run-app.js:551:36 at time (/tools/tool-env/profile.js:232:28) at Function.run (/tools/tool-env/profile.js:377:12) at bundleApp (/tools/runners/run-app.js:541:34) at [object Object]._.extend._runOnce (/tools/runners/run-app.js:594:35) at [object Object]._.extend._fiber (/tools/runners/run-app.js:858:28) at /tools/runners/run-app.js:396:12 - - - - - root@ac7d1be3b145:/simple-todos# 

注意我在windows7上使用boot2docker

编辑1我必须做的才能让它工作

为了使它工作(在新的形象),我必须做到以下几点:但我不想删除它,并重build每一次。 我希望能够提交并在后台运行它作为一个容器。

 root@ac7d1be3b145:/# ls bin boot dev etc home lib lib64 media mnt opt proc root run sbin simple-todos srv sys tmp usr var root@ac7d1be3b145:/# rm -rf simple-todos/ root@ac7d1be3b145:/# root@ac7d1be3b145:/# root@ac7d1be3b145:/# meteor create simple-todos Created a new Meteor app in 'simple-todos'. To run your new app: cd simple-todos meteor If you are new to Meteor, try some of the learning resources here: https://www.meteor.com/learn root@ac7d1be3b145:/# cd simple-todos/ root@ac7d1be3b145:/simple-todos# meteor [[[[[ /simple-todos ]]]]] => Started proxy. => Started MongoDB. => Started your app.