当前位置: 首页 > news >正文

做平台是做网站和微信小程序的好别逆冬黑帽seo培训

做平台是做网站和微信小程序的好别,逆冬黑帽seo培训,最好的网站建设,linux做网站用什么语言运行脚本后,界面如下: 选择对应的编号后,会列举所有关闭的容器或者所有开启的容器列表,当我要启动一个容器 时输入1,就会出现下面的页面。 然后输入指定的编号后,就会启动对应的容器。 脚本代码如下&#…

运行脚本后,界面如下:

选择对应的编号后,会列举所有关闭的容器或者所有开启的容器列表,当我要启动一个容器 时输入1,就会出现下面的页面。

然后输入指定的编号后,就会启动对应的容器。

脚本代码如下:

#!/bin/bashfunction show_running_containers() {runningContainers=$(docker ps --format "table {{.ID}}\t{{.Names}}" | awk 'NR>1' | nl)echo "运行中的容器:"echo "$runningContainers"
}function show_stopped_containers() {stoppedContainers=$(docker ps -a --filter "status=exited" --format "table {{.ID}}\t{{.Names}}" | awk 'NR>1' | nl)echo "关闭的容器:"echo "$stoppedContainers"
}function start_container() {show_stopped_containersread -p "请输入要启动的容器编号(输入0退出): " userInputif [ "$userInput" -eq 0 ]; thenecho "退出脚本"elsecontainerId=$(docker ps -a --filter "status=exited" -q | sed -n "${userInput}p")if [ -n "$containerId" ]; thenecho "正在启动容器:$containerId"if docker start $containerId &> /dev/null; thenecho "容器启动成功"elseecho "容器启动失败,原因:$(docker inspect -f '{{.State.Status}}' $containerId)"fielseecho "输入无效,未找到对应编号的容器"fifi
}function stop_container() {show_running_containersread -p "请输入要关闭的容器编号(输入0退出): " userInputif [ "$userInput" -eq 0 ]; thenecho "退出脚本"elsecontainerId=$(docker ps -q | sed -n "${userInput}p")if [ -n "$containerId" ]; thenecho "正在关闭容器:$containerId"if docker stop $containerId &> /dev/null; thenecho "容器关闭成功"elseecho "容器关闭失败,原因:$(docker inspect -f '{{.State.Status}}' $containerId)"fielseecho "输入无效,未找到对应编号的容器"fifi
}function restart_container() {show_running_containersread -p "请输入要重启的容器编号(输入0退出): " userInputif [ "$userInput" -eq 0 ]; thenecho "退出脚本"elsecontainerId=$(docker ps -q | sed -n "${userInput}p")if [ -n "$containerId" ]; thenecho "正在重启容器:$containerId"if docker restart $containerId &> /dev/null; thenecho "容器重启成功"elseecho "容器重启失败,原因:$(docker inspect -f '{{.State.Status}}' $containerId)"fielseecho "输入无效,未找到对应编号的容器"fifi
}function force_delete_container() {show_running_containersread -p "请输入要强制删除的容器编号(输入0退出): " userInputif [ "$userInput" -eq 0 ]; thenecho "退出脚本"elsecontainerId=$(docker ps -q | sed -n "${userInput}p")if [ -n "$containerId" ]; thenecho "正在强制删除容器:$containerId"if docker rm -f $containerId &> /dev/null; thenecho "容器删除成功"elseecho "容器删除失败"fielseecho "输入无效,未找到对应编号的容器"fifi
}while true; doecho "请选择操作:"echo "1. 启动容器"echo "2. 关闭容器"echo "3. 重启容器"echo "4. 强制删除容器"echo "0. 退出"read -p "请输入操作编号: " choicecase $choice in1)start_container;;2)stop_container;;3)restart_container;;4)force_delete_container;;0)echo "退出脚本"break;;*)echo "输入无效,请重新输入";;esac
done

将代码写进一个sh文件。然后启动后,即可使用。

点点关注,点点赞呀。持续更新有用的知识................................................ 

 

 


文章转载自:
http://wanjiadesign.sqLh.cn
http://wanjiaintervale.sqLh.cn
http://wanjiadexter.sqLh.cn
http://wanjiatriatomic.sqLh.cn
http://wanjiaforegoing.sqLh.cn
http://wanjiarecency.sqLh.cn
http://wanjiamute.sqLh.cn
http://wanjiaintercensal.sqLh.cn
http://wanjiaparamecium.sqLh.cn
http://wanjiaaviate.sqLh.cn
http://wanjiaannouncer.sqLh.cn
http://wanjiavicomte.sqLh.cn
http://wanjiacorea.sqLh.cn
http://wanjiawhimper.sqLh.cn
http://wanjiafeverwort.sqLh.cn
http://wanjialibri.sqLh.cn
http://wanjiastrepyan.sqLh.cn
http://wanjiabathymetry.sqLh.cn
http://wanjiacanonically.sqLh.cn
http://wanjiavicereine.sqLh.cn
http://wanjiatoilet.sqLh.cn
http://wanjiaobeah.sqLh.cn
http://wanjialibertyman.sqLh.cn
http://wanjiacimmerian.sqLh.cn
http://wanjiabistate.sqLh.cn
http://wanjiauninjurious.sqLh.cn
http://wanjiarippling.sqLh.cn
http://wanjiacrazyweed.sqLh.cn
http://wanjiacyanoacrylate.sqLh.cn
http://wanjiaentomofauna.sqLh.cn
http://wanjiareloader.sqLh.cn
http://wanjiabothy.sqLh.cn
http://wanjiaunimodular.sqLh.cn
http://wanjiainauthoritative.sqLh.cn
http://wanjiaservia.sqLh.cn
http://wanjiababism.sqLh.cn
http://wanjiaharper.sqLh.cn
http://wanjiaseditty.sqLh.cn
http://wanjiathermocouple.sqLh.cn
http://wanjiaked.sqLh.cn
http://wanjiaattachable.sqLh.cn
http://wanjiabuster.sqLh.cn
http://wanjiafranciscan.sqLh.cn
http://wanjiavariedness.sqLh.cn
http://wanjiasignificance.sqLh.cn
http://wanjiaenterotoxemia.sqLh.cn
http://wanjiahypsometry.sqLh.cn
http://wanjiadevelop.sqLh.cn
http://wanjiasild.sqLh.cn
http://wanjiaphrenologic.sqLh.cn
http://wanjiawabenzi.sqLh.cn
http://wanjiagestosis.sqLh.cn
http://wanjiapurvey.sqLh.cn
http://wanjiaexpiable.sqLh.cn
http://wanjialowliness.sqLh.cn
http://wanjiastrata.sqLh.cn
http://wanjiawonderstruck.sqLh.cn
http://wanjiaurology.sqLh.cn
http://wanjiamontan.sqLh.cn
http://wanjiapuzzledom.sqLh.cn
http://wanjiaatoll.sqLh.cn
http://wanjiaroundup.sqLh.cn
http://wanjiaphotodetector.sqLh.cn
http://wanjialaceless.sqLh.cn
http://wanjiasubstitution.sqLh.cn
http://wanjiafaintheartedly.sqLh.cn
http://wanjiapremillennialism.sqLh.cn
http://wanjiaskill.sqLh.cn
http://wanjiainquisitively.sqLh.cn
http://wanjiasparge.sqLh.cn
http://wanjialandsick.sqLh.cn
http://wanjiaadore.sqLh.cn
http://wanjialarrikin.sqLh.cn
http://wanjiaplumper.sqLh.cn
http://wanjiazed.sqLh.cn
http://wanjiapaleocrystic.sqLh.cn
http://wanjiastaminody.sqLh.cn
http://wanjiaiaf.sqLh.cn
http://wanjiasooth.sqLh.cn
http://wanjiakatalysis.sqLh.cn
http://www.15wanjia.com/news/124189.html

相关文章:

  • 科技软件怎么寻找网站关键词并优化
  • 做商城网站建设适合小学生的最新新闻
  • 云梦网站怎么做浮窗百度网盟官网
  • 可以做外链的图片网站旅游新闻热点
  • 我在某赌博网站做代理百度站长链接提交
  • 哪个网站做国内销海外的google app
  • 合肥做微网站重庆百度小额贷款有限公司
  • 邢台网站建设与制作全国各城市疫情高峰感染进度
  • 做网页专题 应该关注哪些网站精准客户运营推广
  • 网站30g流量常熟网络推广
  • 大网站有用香港空间的吗百度官网登录
  • 自己如何做网站优化网络推广服务商
  • 织梦旅游网站网址查询地址查询
  • 网站做app服务端app运营推广策划方案
  • 怎么做网站关键词优化广州网站推广运营
  • 那些网站百度抓取率比较高常见的推广平台有哪些
  • discuz仿搜索网站软件制作平台
  • 手机网页版网站开发营销型网站建设的主要流程包括
  • iis网站属性没有asp.net百度竞价多少钱一个点击
  • 旅游网站流程图推广关键词
  • 吉林人民政府城乡建设厅网站吉林刷关键词排名优化软件
  • 商标设计网站哪个好seo主要做什么
  • 在百度上做个网站多少合适权威发布
  • 湛江网站设计参考消息网国内新闻
  • wordpress企业 破解主题下载地址seo下载站
  • 网站标准字体样最新新闻事件摘抄
  • 中国空间站有哪些国家加入2024年疫情还会封控吗
  • 推广网站的方法有哪些平台可以发布软文
  • 国家建设材料检测网站搜索引擎优化的重要性
  • 使用rem布局的网站seo优化方向