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
First, download the installation package from the...
Log in docker login Complete the registration and...
1. What is deadlock? The official definition is a...
hint This plug-in can only be accessed under the ...
1. Introduction to mysqldump mysqldump is a logic...
Table of contents Ref and Reactive Ref Reactive T...
After three days of encountering various difficul...
When we write CSS, we sometimes forget about the ...
Convert code to image using html2canvas is a very...
Recently, I learned about the Vue project and cam...
Table of contents Preface 1. for loop 2. while lo...
FireFox is a commonly used browser with many exte...
MySQL handles GROUP BY and DISTINCT queries simil...
Table of contents Preface What situations can cau...
1. Set the list symbol list-style-type: attribute...