Skip to content

Instantly share code, notes, and snippets.

@AndrewRussellHayes
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewRussellHayes/efd0067342874a3dc4d2 to your computer and use it in GitHub Desktop.
Save AndrewRussellHayes/efd0067342874a3dc4d2 to your computer and use it in GitHub Desktop.
start a docker centos image detached with stdin and a pseudo-tty to keep it running like a vm until bash is killed
docker run -t -i -d centos /bin/bash
@AndrewRussellHayes
Copy link
Author

still having issues with attach and detach

@AndrewRussellHayes
Copy link
Author

fixed:

You can detach from the container again (and leave it running) with CTRL-p CTRL-q (for a quiet exit), or CTRL-c which will send a SIGKILL to the container, or CTRL-\ to get a stacktrace of the Docker client when it quits. When you detach from the container's process the exit code will be returned to the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment