Docker
Docker
===========
===========
1. Download images to local
$ docker pull <image_name:tag>
Docker hub: https://hub.docker.com/
2. Run a images
$ docker run -name <unique_container_name> ...
$ docker run --help
3. List container
$ docker ps -a ///list all
$ docker ps //list container is running
4. Start/Stop Container
$ docker stop <container_id/container_name>
$ docker start <container_id/container_name>
5. Remove container/images
$ docker rm <container_id/container_name>
$ docker rmi <img_name>
6. Check container detail
$docker inspect <container_id/container_name>
7. Install docker-compose
Ref: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-centos-7
//Check docker-compose version before install. In there docker-compose version is 1.23.2.
// Check latest docker-compose here:
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
$ docker-compose --version
Remove docker-compose
#by curl
$ sudo rm /usr/local/bin/docker-compose
$ sudo yum remove docker-compose
$ pip uninstall docker-compose
Problems:
1. Warning: Stop docker.service, but it can still be activated by : docker.socker
Solution:
1. systemctl stop docker.socket
is updating....
Comments[ 0 ]
Post a Comment