本篇內(nèi)容介紹了“怎么獲取一個(gè)docker鏡像以及創(chuàng)建一個(gè)docker網(wǎng)絡(luò)”的有關(guān)知識(shí),在實(shí)際案例的操作過程中,不少人都會(huì)遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
創(chuàng)新互聯(lián)公司是一家集網(wǎng)站建設(shè),寧洱企業(yè)網(wǎng)站建設(shè),寧洱品牌網(wǎng)站建設(shè),網(wǎng)站定制,寧洱網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷,網(wǎng)絡(luò)優(yōu)化,寧洱網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。
以下語句將下載包含已編譯軟件的Ubuntu鏡像。
docker pull eosio/eos
作為快速測(cè)試,運(yùn)行鏡像并獲取對(duì)bash shell的訪問權(quán)限,請(qǐng)執(zhí)行以下操作:
docker run --rm -it eosio/eos bash
如果可行,你應(yīng)該得到如下所示的提示,輸入cleos
應(yīng)返回cleos工具的幫助:
root@a5f9eafaab74:/#cleos ERROR: RequiredError: Subcommand required Command Line Interface to EOSIO Client Usage: cleos [OPTIONS] SUBCOMMAND Options: -h,--help Print this help message and exit -u,--url TEXT=http://localhost:8888/ the http/https URL where nodeos is running --wallet-url TEXT=http://localhost:8888/ the http/https URL where keosd is running -v,--verbose output verbose actions on error Subcommands: version Retrieve version information create Create various items, on and off the blockchain get Retrieve various items and information from the blockchain set Set or update blockchain state transfer Transfer EOS from account to account net Interact with local p2p network connections wallet Interact with local wallet sign Sign a transaction push Push arbitrary transactions to the blockchain multisig Multisig contract commands system Send eosio.system contract action to the blockchain. root@a5f9eafaab74:/# root@a5f9eafaab74:/#exit
鍵入exit
退出鏡像。
創(chuàng)建一個(gè)docker網(wǎng)絡(luò),允許容器相互通信。
docker network create eosnetwork
運(yùn)行服務(wù)器軟件(在端口7777上):
docker run --name server --network=eosnetwork --rm -p 7777:7777 -i eosio/eos /bin/bash -c "nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::http_plugin -d /mnt/dev/data --http-server-address=0.0.0.0:7777 --access-control-allow-origin=*"
要運(yùn)行錢包軟件(在端口5555上):
docker run --name wallet --network=eosnetwork --rm -p 5555:5555 -i eosio/eos /bin/bash -c "keosd --http-server-address=0.0.0.0:5555"
讓我們打開一個(gè)bash shell,以便我們可以測(cè)試一些工具。
docker run --name tools --network=eosnetwork --rm -it eosio/eos /bin/bash
現(xiàn)在讓我們確保服務(wù)器正在運(yùn)行:
http://localhost:7777/v1/chain/get_info應(yīng)該可以在本地Web瀏覽器中使用。
從工具docker實(shí)例運(yùn)行此命令應(yīng)該工作:
$ cleos -u http://server:7777 get info # Expected response { "server_version": "749a6759", "head_block_num": 1953, "last_irreversible_block_num": 1952, "last_irreversible_block_id": "000007a0c1ae4e28480dcbeef36e9d4970987969f850453dcf8e244b569d6325", "head_block_id": "000007a1fc0d5b3dd16ebfe18ab9a288ac8bc7d03caee050a58a502577d25560", "head_block_time": "2018-05-16T02:04:08", "head_block_producer": "eosio", "virtual_block_cpu_limit": 701979, "virtual_block_net_limit": 7389096, "block_cpu_limit": 99900, "block_net_limit": 1048576 }
$ cleos --wallet-url http://wallet:5555 wallet list keys # We have not created any wallets yet, so this is the expected response Wallets: [] []
“怎么獲取一個(gè)docker鏡像以及創(chuàng)建一個(gè)docker網(wǎng)絡(luò)”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!
名稱欄目:怎么獲取一個(gè)docker鏡像以及創(chuàng)建一個(gè)docker網(wǎng)絡(luò)
網(wǎng)頁鏈接:http://www.muchs.cn/article34/pieise.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供商城網(wǎng)站、手機(jī)網(wǎng)站建設(shè)、ChatGPT、電子商務(wù)、、域名注冊(cè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)