Category Archives: Docker

Recently, my computer meets a problem; it already shuts down automatically. I already influences my normal development work. I went to apple store and then they checked everything. They said nothing wrong with hardware, maybe something wrong with software. They suggested me to refresh everything and recover back to empty operating system. It is really pain thing for me. Backup all documents, images and videos cost me 5 hours. This is ok, because I only need copy them back. But all applications and development env are gone. In fact, applications are also ok, since I can re-install them back. The worst thing is for the development env. I need to re-install and re-configure. So in order to avoid this worst thing happens again, I decide to use Docker to re-config my development env. If in the future, the problem happens again or I need to switch to another new device to work, it is more easily for me and helps me to shorten the transformation time. So let’s do it!

Step3: Some useful Docker commands in VM

$ docker search centos // It will help you to search one image
$ docker pull centos // It will help you to download one image
$ docker images // it will list all images which you have
$ docker ps // it will show all running containers
$ docker ps -a // it will show all containers
$ docker rm // it will remove container
$ docker rmi // it will remove image
$ docker rm `docker ps -a -q` // it will remove all containers
$ docker history image_name // list image's history
$ docker info // get docker info

4.4 Connect between different containers

Step5: Publish to Docker Hub

Step5: Fix bugs

“no space left on device”

If you’re using Boot2Docker with a large number of images, or the images you’re working with are very large, your pulls might start falling with “no space left on device” errors when the Boot2Docker volume fills up.