Create new container with interactive shell

I wanted to create a new container with Node.js and start a bash-shell in it where I can interactively verify something.

Therefore I did docker run node /bin/bash but it exited instantly.
What did I do wrong?

  • Having two NIC's on a Docker image before it boots
  • php support for mongoDB
  • Creating/Running a docker container from within a c# program (under mono)
  • Error Running Dockerrun.aws.json file ERROR: ValueError :: Extra data
  • Reduce memory consumption in rake assets:precompile
  • After running the cygnus docker, it exists immediately (no errors though)
  • Using private registry hosted on docker
  • What's the purpose of binding vip addr in every container of a service in docker 1.12?
  • Running the WSO2 Application Manager docker image with custom configuration
  • Docker : How are intermediate containers formed
  • docker build : Fatal error: Class 'Memcached' not found
  • ERROR: hyperledger/fabric:make gotools: unrecognized import path “golang.org/x/tools/go/gcexportdata”
  • One Solution collect form web for “Create new container with interactive shell”

    You missed the -it: docker run -it <image-name> /bin/bash

    –interactive, -i: Keep STDIN open even if not attached

    –tty, -t: Allocate a pseudo-TTY

    docker run reference

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.