Docker installation1. Requirements: Linux kernel version 3.10 or above View: uname -r Kernel upgrade: yun update 2. Docker installation yum install docker 3. Check the docker version docker -v 4. Docker startup systemctl start docker 5. Stop docker systemctl stop docker 6. Set up Docker startup systemctl enable docker Docker UninstallView Software Installation rpm -qa |grep -i docker or yum list installed | grep docker Uninstall Docker yum remove docker*.x86_64 //Delete related images and containers rm -rf /var/lib/docker Common Docker Operations 1. Search: docker search mysql 2. Pull docker pull docker pull tomcat:8.0.18-jre7 3. View local image docker images 4. Delete the image docker rmi image-id 5. Run the container docker run --name mytomcat -d tomcat:8.0.18-jre7 Start tomcat: docker run -d -p 8888:8080 --name mytomcat tomcat:8.0.18-jre7 Start mysql: docker run --name mysql01 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.6 Start redis: docker run -d -p 6379:6379 --name redis01 redis:4.0.12 Start RabbitMQ: docker run -d -p 5672:5672 -p 15672:15672 --name rabbitMQ 41f7a13e37d3 Check the redis version under docker: docker exec -it redis01 redis-server -v -p: port mapping, the virtual machine's port 8888 is mapped to the tomcat container's port 8080 6. View the containers running in Docker docker ps 7. View all containers in Docker docker ps -a 8. Stop the running container docker stop container-id or container name 9. Restart the container docker start container-id 10. Delete the container (the container needs to be in the stopped state) docker rm container-id 11. Check the firewall status service firewalld status service firewalld stop: Turn off the firewall 12. View container logs docker logs container-id This is the end of this article about the summary of commonly used docker commands. For more related commonly used docker commands, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Brief analysis of the introduction and basic usage of Promise
>>: Application of HTML and CSS in Flash
Understand this Perhaps you have seen this in oth...
Three ways to use CSS in HTML: 1. Inline style: s...
Table of contents design Component Communication ...
Preface We know that index selection is the work ...
MTR stands for Mini-Transaction. As the name sugg...
SpringBoot is like a giant python, slowly winding...
Preface The three-column layout, as the name sugg...
In web page production, input and img are often pl...
Using DOSBox, you can simulate DOS under Windows ...
This article shares the specific code of JavaScri...
Mysql sets boolean type 1. Tinyint type We create...
Today I will share with you how to write a player...
Table of contents 1. The role of nginx process lo...
Will mysql's IN invalidate the index? Won'...
Slow query log related parameters MySQL slow quer...