小编Min*_*Han的帖子

当我们在Windows上使用它时,docker图像和容器存储在哪里?

注意:对于Windows和Docker来说都是新手

我一直在使用的教程说,/var/lib/docker/containers如果我们使用的是Linux,它们就在使用,但我似乎无法在我的Windows机器上找到它.

谢谢!

windows containers image docker

20
推荐指数
4
解决办法
2万
查看次数

在构建docker镜像时,无法npm安装依赖项

我正在构建一个Dockerfile中的图像,并且我构建映像时我的npm安装依赖项的部分是错误的,但我可以在它之外运行命令.我不确切地知道这个错误的来源.

我在Windows上使用boot2docker,我的Dockerfile是:

FROM ubuntu:15.04

RUN apt-get -y update 
RUN apt-get -y install nodejs 
RUN apt-get -y install npm 

COPY /server /src
COPY /server/package.json /tmp/package.json

RUN cd /tmp && npm install

(etc)
Run Code Online (Sandbox Code Playgroud)

错误消息是:

sh:1 node: not found
npm WARN: This failure might be due to the use of legacy binary "node"
npm WARN: For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! sails@0.11.0 preinstall: 'node ./lib/preinstall_npmcheck.js'
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the sails@0.11.0 preinstall script.
npm …
Run Code Online (Sandbox Code Playgroud)

windows npm docker sails.js dockerfile

5
推荐指数
1
解决办法
2105
查看次数

使用Docker的单容器应用程序的ECS或EB?

我使用Docker部署了一个单容器SailsJS应用程序(映像大小约为597.4 MB),并将其连接到ElasticBeanstalk.

但是,由于ECS是为Docker构建的,那么在EB上使用它可能会更好吗?

deployment amazon-ecs docker amazon-elastic-beanstalk

2
推荐指数
1
解决办法
468
查看次数

apt-get在Dockerfile中不起作用

答案:我仍然不知道出了什么问题,但是在我重新启动docker并再次运行它(相同的dockerfile,同样的一切)后,它运行正常.

我在Windows上使用Docker而我的Dockerfile是

FROM ubuntu:15.04

COPY . /src

RUN apt-get update 
RUN apt-get install -y nodejs 
...etc
Run Code Online (Sandbox Code Playgroud)

但是当我尝试构建我得到的图像时

WARN[0001] SECURITY WARNING: You are building a Docker image from Windows against a Linux Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories

...

Step 3: RUN apt-get -y update
 --> Using cache
 --->ccd4120f98dd
Removing intermediate container 255796bdef29
Step 4: RUN apt-get install …
Run Code Online (Sandbox Code Playgroud)

windows apt-get node.js docker

1
推荐指数
2
解决办法
1万
查看次数