0
votes

I am trying to run docker container on bluemix

docker version on my local sys is Docker version 1.11.2, build b9f10c9 ibm-container plugin version IBM-Containers 0.8.897 ic
IBM Containers plug-in cf --version cf version 6.21.0+dff2cf8-2016-07-27

This is my simple hello world docker file

FROM ubuntu RUN apt-get -y update && apt-get install -y wget vim RUN
apt-get install -y python
RUN mkdir /local 
ADD hello.py
/local/hello.py WORKDIR /local

I have built this and pushed to ibm bluemix image registry to run the docker container:

cf ic run --name=testnode registry.ng.bluemix.net/manikkandanb/cardcamp

next

cf ic exec testnode date

Error response from daemon: Container nova-ca6efe81-f1d6-4939-be21-d40f1a702aee is not running FAILED Command failed

cf ic exec testnode python /local/hello.py

Error response from daemon: Container nova-ca6efe81-f1d6-4939-be21-d40f1a702aee is not running FAILED Command failed

what am I missing here? why cant I execute the script or any commands in this container?

NOTE: the same docker image works in any other environment but this bluemix.

1
what is the output of cf ic ps ?Crescenzo Migliaccio
web@web-virtual-machine:~$ cf ic exec testnode date, Error response from daemon: Container nova-02022e58-9699-4db1-a9ca-22ff74505583 is not running FAILED Command failed web@web-virtual-machine:~$ cf ic ps, CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES, 02022e58-969 registry.ng.bluemix.net/manikkandanb/cardcamp:latest "" 4 minutes ago Running 3 minutes ago testnodeRaian

1 Answers

1
votes

The command cf ic ps -a might report that a container is running while it in real life is stopped

make sure that your container is running by adding a command that prevent the contriner for stopping. This could be done by adding this line to the end of your Dockerfile
CMD tail -F -n0 /etc/hosts

.... if not you could try this Dockerfile: FROM ubuntu:14.04 MAINTAINER Rune Langoy "[email protected]" RUN apt-get update CMD tail -F -n0 /etc/hosts