How to run imported image in Docker.io?
docker, node.js
Solution
`docker run` takes a command to run as its final argument. The command must exist in the container. For example, `docker run <image> bash` will run `bash` in the container and then immediately exit. To have an interactive bash shell in the container use `docker run -t -i <image> bash`.
`docker run` does not take Dockerfile commands like `ADD` and `CMD`. To use a Dockerfile, put all your commands in a file called `Dockerfile`, then use `docker build -t="some tag name" .` to build the image.
You should begin with the Getting Started guide to better understand Docker.
Problem
I have tried hello world node.js with docker. I have created an image & container. I exported the container using ``` docker export $container_ID > container_ID.tar ``` Q. How to run it after importing it back ? ``` docker import - <user-name>/node-hello < container_ID.tar docker run -p 49610:8080 -d <user-name>/node-hello ``` Error: create: No command specified I found a a git hub issue import error solution given here is : ``` docker run -p 49610:8080 -d <user-name>/node-hello /someCommandToRun.sh ``` I tried adding Dockerfile commands like (ADD ./src;cd ./src;npm install ; CMD['node','./src/index.js']) but the image fails with exit 127 Q. What is the command to give the node-hello-world image to run ?