无法使用bluemix中的简单节点应用示例运行docker容器

时间:2022-04-06 20:52:22

this is a simple node app example, and it works ok in my machine ;-) , locally I kick off the container with the script deploy_local.sh, and I get:

这是一个简单的节点应用程序示例,它在我的机器上正常工作;-),在本地我用脚本deploy_local.sh启动容器,我得到:

$ ./deploy_local.sh 
Target is local host. Invoking docker with the given arguments...
Untagged: example:latest
Target is local host. Invoking docker with the given arguments...
Pulling repository registry-ice.ng.bluemix.net/ibmnode
...
Status: Image is up to date for registry-ice.ng.bluemix.net/ibmnode:latest
Target is local host. Invoking docker with the given arguments...
Sending build context to Docker daemon 6.656 kB
...
Successfully built 83d92bb3ff5f
Target is local host. Invoking docker with the given arguments...
flag provided but not defined: -f
See '/usr/bin/docker --help'.
Target is local host. Invoking docker with the given arguments...
OI
$

having the image locally I then try to push it to bluemix, successfully:

在本地拥有图像我然后尝试将其推送到bluemix,成功:

$ ice --local push registry-ice.ng.bluemix.net/techdays/example
Target is local host. Invoking docker with the given arguments...
The push refers to a repository [registry-ice.ng.bluemix.net/techdays/example] (len: 1)
Sending image list
...
Image 4f7397e97d5c already pushed, skipping
Pushing tag for rev [83d92bb3ff5f] on {https://registry-ice.ng.bluemix.net/v1/repositories/techdays/example/tags/latest}
$

but when I try to run it:

但是当我尝试运行它时:

$ ice run --name example registry-ice.ng.bluemix.net/techdays/example
Command failed with container cloud service
{
    "id": "IC0000", 
    "incident_id": "37295f32b40079a8", 
    "message": "Sorry, an error occurred on our side. Please reference the problem using the provided incident ID.", 
    "name": "DefaultError", 
    "type": "General"
}
$ 

has anyone experienced this ?

有没有人经历过这个?

my tools versions:

我的工具版本:

$ ice version
ICE CLI Version        : 2.0.1 271 2015-03-30T15:40:18
$ docker --version
Docker version 1.5.0, build a8a31ef

-- dockerfile --

- dockerfile -

FROM registry-ice.ng.bluemix.net/ibmnode:latest
WORKDIR /
RUN mkdir -p /app
ADD dist /app
WORKDIR /app
CMD ["node", "app.js"]

-- app.js --

- app.js -

console.log('OI');

-- deploy_local.sh --

- deploy_local.sh -

#!/bin/sh
CONTAINER_NAME=example
REGISTRY=registry-ice.ng.bluemix.net
ORG=techdays
ice --local pull $REGISTRY/ibmnode
ice --local build -t $CONTAINER_NAME .
ice --local -f tag $CONTAINER_NAME $REGISTRY/$ORG/$CONTAINER_NAME
ice --local run $CONTAINER_NAME

2 个解决方案

#1


1  

You have to update ICE and docker versions. For Bluemix container you need ICE version 3 and docker 1.6.2 or 1.7.

您必须更新ICE和docker版本。对于Bluemix容器,您需要ICE版本3和docker 1.6.2或1.7。

See this document for more details and links to install the recommended versions of the tools.

有关更多详细信息和安装推荐版本工具的链接,请参阅此文档。

#2


1  

according to the error message, it seems a temporary problem with container enviroment. Is it still not working or is it solved right now?

根据错误信息,它似乎是容器环境的暂时问题。它现在还没有工作还是现在解决了?

#1


1  

You have to update ICE and docker versions. For Bluemix container you need ICE version 3 and docker 1.6.2 or 1.7.

您必须更新ICE和docker版本。对于Bluemix容器,您需要ICE版本3和docker 1.6.2或1.7。

See this document for more details and links to install the recommended versions of the tools.

有关更多详细信息和安装推荐版本工具的链接,请参阅此文档。

#2


1  

according to the error message, it seems a temporary problem with container enviroment. Is it still not working or is it solved right now?

根据错误信息,它似乎是容器环境的暂时问题。它现在还没有工作还是现在解决了?