Docker
# view Mirrors
Docker images
# View the operating container
Docker PS
# run Ubuntu
Docker Run-i-T Daocloud.io/ubuntu:14.04/bin/bash
# run Ubuntu, delete container automatically when exiting
Docker run-i-T--rm Daocloud.io/ubuntu:14.04/bin/bash
# switch machine, use DOCKER-VM
Eval "$ (docker-machine env DOCKER-VM)"
#切换到 Dev Machine
Eval "$ (docker-machine env Dev)"
# Stop all containers
Docker stop $ (Docker ps-a-Q)
# Delete the specified mirror
Docker RMI $image
# Delete An unsigned mirror, that is, a mirror with ID <None>
Docker RMI $ (Docker images | grep "^<none>" | awk "{print $}")
# Delete all Mirrors
Docker RMI $ (Docker images-q)
# Kill all the containers that are running
Docker kill $ (Docker ps-a-Q)
# Delete all containers that have been stopped
Docker RM $ (Docker ps-a-Q)
# Remove all mirrors that are not labeled dangling
Docker RMI $ (Docker images-q-F Dangling=true)
# Delete all Mirrors
Docker RMI $ (Docker images-q)
# view memory, CPU usage
Docker stats $ (Docker ps-q)
CONTAINER CPU% mem usage/limit mem% NET I/O block I/O
452bc3877700 0.03% 480.2 mb/1.044 GB 45.98% 2.028 kb/648 b 0 b/0 b
C2C1DDA7E9BB 0.01% 11.93 mb/1.044 GB 1.14% 7.096 kb/3.522 KB 0 b/0 B
f35f291d6659 0.00% 9.806 mb/1.044 GB 0.94% 8.638 kb/8.422 KB 0 b/0 B
Docker-machine
# View Machine List
Docker-machine ls
NAME ACTIVE DRIVER State URL SWARM Docker ERRORS
Default * VirtualBox Running tcp://192.168.99.100:2376 v1.10.3
# View Machine Status
Docker-machine Status Default
# Login Machine Default
Docker-machine SSH Default
Docker-compose
# View the container in operation
Docker-compose PS
name command State Ports
----------------------- ------------------------------------------------------------------
dockerfiles_mysql_1 docker-entrypoint.sh mysqld up 0.0.0.0:3306->3306/tcp
Dockerfiles _nginx_1 nginx-g Daemon off; Up 443/tcp, 0.0.0.0:8080->80/tcp
dockerfiles_php_1 php-fpm up 0.0.0.0:9000->9000/tcp
# Run Container
Docker-compose up