In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail what are the simple commands about docker. Xiaobian thinks it is quite practical, so share it with you for reference. I hope you can gain something after reading this article.
#Copy files into containers
docker cp ./ node.sql jjt-mysql:/var/lib/mysql
docker cp /root/db/node.sql jjt-mysql:/var/lib/mysql
#Enter the container
docker exec -it jjt-mysql bash
See which containers
docker ps
docker ps | grep mysql
#See what commands are available
docker
#See help for run command
docker run --help
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE < backup.sql
select @@sql_mode;
#View Mounts section
docker inspect jjt-mysql-5.7.18
#Restart after modification
docker restart jjt-mysql-5.7.18
#This is to view only the mount directory
docker inspect -f {{.Mounts}} jjt-mysql-5.7.18
{{.Mounts}} in the middle is a template language for go
Not adding-f {{.Mounts}} means seeing all the information
About "docker simple command what" this article is shared here, I hope the above content can have some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.