In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to clean the docker private server image regularly? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
download
Wget https://s3.eu-west-2.amazonaws.com/nexus-cli/1.0.0-beta/linux/nexus-clichmod + x nexus-cli
Configuration
. / nexus-cli configure
A. credentials file will eventually be created in this directory
# Nexus Credentialsnexus_host = "http://nexus.demo.com"nexus_username =" admin "nexus_password =" adminpass "nexus_repository =" your-docker-private-repo "
Note that the host and port of nexus entered by host are not the ports of repo corresponding to docker.
Nexus_repository is the repo corresponding to docker.
View Mirror
. / nexus-cli image ls
Keep the last 5
. / nexus-cli image delete-name mlabouardy/nginx-keep 5
Comprehensive script
Clean.sh
Image_file=image.txtCLI_HOME=/data/nexus3KEEP_VERSION_NUM=5 $CLI_HOME/nexus-cli image ls > $image_filesed-I'$d' $image_filecat $image_file | while read linedo echo "Clean $line" $CLI_HOME/nexus-cli image delete-name $line-keep $KEEP_VERSION_NUMdone
Scheduled task
Crontab-e0 2 * sh / data/nexus3/clean.sh is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.