成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

如何通過puppet管理遠(yuǎn)程docker容器

小編給大家分享一下如何通過puppet管理遠(yuǎn)程docker容器,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

成都創(chuàng)新互聯(lián)主營義烏網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,重慶App定制開發(fā),義烏h5微信小程序開發(fā)搭建,義烏網(wǎng)站營銷推廣歡迎義烏等地區(qū)企業(yè)咨詢

使用腳本訪問docker容器:

root@docker:~# ./control.sh 
What you want to do?try input 'help' to get some tips(please input the words in ''): access
Please input the specific container's name:web1
root@050ebb07cf25:/#                   #已經(jīng)進(jìn)入docker容器,輸入exit退出,不過腳本也會退出

獲取幫助信息(不妨多試試其他命令):

root@docker:~# ./control.sh 
What you want to do?try input 'help' to get some tips(please input the words in ''): help
################################################################################################################################
                                            The helping information about this script                                           
################################################################################################################################
COMMAND                                       INFO                                                                              
################################################################################################################################
'status'                                      get the info about the running containers.                                        
'access'                                      access the specific contianer.                                                    
'manage'                                      manage the contianer,such as 'start','stop' and 'delete'.                         
'exit'                                        exit this script.                                                                 
'statusa'                                     show the infomation about all containers.                                         
'statusl'                                     show the latest infomation about container.                                       
################################################################################################################################
MAINCOMMAND                  SUBCOMMAND                  INFO                                                                   
################################################################################################################################
'manage'                     'start'                     launch a exist contianer                                               
'manage'                     'stop'                      stop a running container                                               
'manage'                     'delete'                    detele a not-running container                                         
'manage'                     'status'                    get the info about the running containers                              
'manage'                     'statusa'                   show the infomation about all containers.                              
'manage'                     'statusl'                   show the latest infomation about container.                            
################################################################################################################################
What you want to do?try input 'help' to get some tips(please input the words in ''):

stop容器,delete容器,start容器:

stop容器web1:

root@docker:~# ./control.sh 
What you want to do?try input 'help' to get some tips(please input the words in ''): manage
Please input the container name which you want to manage,or 'exit',or 'help'?: status
Running container:
CONTAINER ID        IMAGE                    COMMAND             CREATED             STATUS              PORTS                    NAMES
050ebb07cf25        training/webapp:latest   "python app.py"     12 minutes ago      Up 12 minutes       0.0.0.0:2000->5000/tcp   web1                   
0ef5d56e4c89        training/webapp:latest   "python app.py"     12 minutes ago      Up 12 minutes       0.0.0.0:1000->5000/tcp   web1/webbase,webbase   
Please input the container name which you want to manage,or 'exit',or 'help'?: web1
Do you want to 'start' or 'stop' or 'delete' your container?: stop
Notice:container is stopping
web1
Please input the container name which you want to manage,or 'exit',or 'help'?:

web1被停掉

start容器web1:

Please input the container name which you want to manage,or 'exit',or 'help'?: web1
Do you want to 'start' or 'stop' or 'delete' your container?: start
Notice:Please make sure this container is not running
web1
Please input the container name which you want to manage,or 'exit',or 'help'?: status
Running container:
CONTAINER ID        IMAGE                    COMMAND             CREATED             STATUS              PORTS                    NAMES
050ebb07cf25        training/webapp:latest   "python app.py"     14 minutes ago      Up 6 seconds        0.0.0.0:2000->5000/tcp   web1                   
0ef5d56e4c89        training/webapp:latest   "python app.py"     14 minutes ago      Up 14 minutes       0.0.0.0:1000->5000/tcp   web1/webbase,webbase   
Please input the container name which you want to manage,or 'exit',or 'help'?:

web1又啟動了

delete容器web1(必須先把它關(guān)閉):

Please input the container name which you want to manage,or 'exit',or 'help'?: web1
Do you want to 'start' or 'stop' or 'delete' your container?: stop
Notice:container is stopping
web1
Please input the container name which you want to manage,or 'exit',or 'help'?: status
Running container:
CONTAINER ID        IMAGE                    COMMAND             CREATED             STATUS              PORTS                    NAMES
0ef5d56e4c89        training/webapp:latest   "python app.py"     15 minutes ago      Up 15 minutes       0.0.0.0:1000->5000/tcp   web1/webbase,webbase         #web1被關(guān)閉
Please input the container name which you want to manage,or 'exit',or 'help'?: web1
Do you want to 'start' or 'stop' or 'delete' your container?: delete
Notice:You cannot delete a running container,if the container is running,please stop it first!
web1
Please input the container name which you want to manage,or 'exit',or 'help'?: statusa
All infomation about containers:\n
CONTAINER ID        IMAGE                    COMMAND             CREATED             STATUS                     PORTS                    NAMES
0ef5d56e4c89        training/webapp:latest   "python app.py"     17 minutes ago      Up 17 minutes              0.0.0.0:1000->5000/tcp   webbase                 
4de1685a386e        training/webapp:latest   "/bin/bash"         37 hours ago        Exited (0) 37 hours ago                             backstabbing_lovelace   
c915cb516b02        training/webapp:latest   "python app.py"     37 hours ago        Exited (-1) 37 hours ago                            clever_mccarthy         #沒有web1的相關(guān)信息了

web1被刪除

tips:在manage會話下輸入exit,將會返回主會話,再輸入一次exit退出腳本:

root@docker:~# ./control.sh 
What you want to do?try input 'help' to get some tips(please input the words in ''): manage
Please input the container name which you want to manage,or 'exit',or 'help'?: exit                #退出manage會話
Exiting
What you want to do?try input 'help' to get some tips(please input the words in ''): exit          #主會話中退出
root@docker:~#

以上是“如何通過puppet管理遠(yuǎn)程docker容器”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

網(wǎng)站標(biāo)題:如何通過puppet管理遠(yuǎn)程docker容器
網(wǎng)頁網(wǎng)址:http://jinyejixie.com/article18/ijgegp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供面包屑導(dǎo)航微信小程序、建站公司品牌網(wǎng)站制作、網(wǎng)站設(shè)計Google

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站托管運(yùn)營
长乐市| 丰宁| 郑州市| 磴口县| 托里县| 长春市| 象山县| 景洪市| 金溪县| 东光县| 措勤县| 望奎县| 灵川县| 哈尔滨市| 呼和浩特市| 高密市| 康保县| 叙永县| 手机| 翁牛特旗| 酒泉市| 大宁县| 塘沽区| 泗阳县| 双辽市| 齐齐哈尔市| 湘阴县| 大悟县| 寿宁县| 嘉定区| 山阴县| 天柱县| 苍梧县| 横峰县| 北宁市| 和硕县| 化州市| 五大连池市| 承德市| 荆州市| 固原市|