-
Notifications
You must be signed in to change notification settings - Fork 1
Docker Code Snippets
tulpar008 edited this page Sep 10, 2015
·
4 revisions
Date: 2015-05-15
Title: Docker 命令碎片
Tags: Snippets, Docker
Category: IT
sudo docker build .
docker run -it tulpar008/blog /bin/bash
docker commit -m "..." CONTAINER_ID tulpar008/blog:v2.1
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
curl -sSL https://get.docker.com/ubuntu/ | DOCKER_VERSION=1.3.3 sh
# Or using a specific path?
curl -sSL https://get.docker.com/1.3.3/ubuntu/ | sh
# attach
$ sudo docker attach 665b4a1e17b6 #by ID
## or
$ sudo docker attach loving_heisenberg #by Name
# exec
$ sudo docker exec -i -t 665b4a1e17b6 bash #by ID
or
$ sudo docker exec -i -t loving_heisenberg bash #by Name