Skip to content

Instantly share code, notes, and snippets.

@ytakano
Last active November 25, 2015 07:23
Show Gist options
  • Save ytakano/f501eb6d6bdfc156f2ea to your computer and use it in GitHub Desktop.
Save ytakano/f501eb6d6bdfc156f2ea to your computer and use it in GitHub Desktop.

statusがexitedなcontainerを削除

docker rm $(docker ps -a --filter 'status=exited' -q)

Ubuntu 15.10のコンテナを起動

sudo docker run -it --name ansible ubuntu:15.10 bash
  • -i: interactive
  • -t: allocate tty

containerのステータスを確認

sudo docker ps -l

containerからdetatch

ctrl-p ctrl-q

containerへattach

sudo docker attach [name]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment