這篇文章主要介紹“快速國(guó)內(nèi)代碼Repo和Docker鏡像的拉取怎么啟動(dòng)”,在日常操作中,相信很多人在快速國(guó)內(nèi)代碼Repo和Docker鏡像的拉取怎么啟動(dòng)問(wèn)題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”快速國(guó)內(nèi)代碼Repo和Docker鏡像的拉取怎么啟動(dòng)”的疑惑有所幫助!接下來(lái),請(qǐng)跟著小編一起來(lái)學(xué)習(xí)吧!
創(chuàng)新互聯(lián)公司主營(yíng)北流網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,成都app開(kāi)發(fā),北流h5微信小程序搭建,北流網(wǎng)站營(yíng)銷推廣歡迎北流等地區(qū)企業(yè)咨詢
Apollo的主站代碼Repo是在Github上,鏡像Repo是在DockerHub上,拉取時(shí)間長(zhǎng)也不穩(wěn)定。
首先,在Github Apollo的Quick Start中就有說(shuō)明中國(guó)的快速代碼拉取。
國(guó)內(nèi)放在了Gitee上。
git clone https://gitee.com/ApolloAuto/apollo.git git remote set-url origin git@github.com:YOUR_GITHUB_USERNAME/apollo.git # Using SSH git remote add upstream git@github.com:ApolloAuto/apollo.git git remote -v git pull --rebase upstream master
第一步: 瀏覽器打開(kāi)如下兩個(gè)網(wǎng)址,找到對(duì)應(yīng) IP 地址: http://github.com.ipaddress.com/ http://github.global.ssl.fastly.net.ipaddress.com/
第二步: 編輯 hosts 文件 sudo vim /etc/hosts 加入如下兩行:
140.82.xx.xxx github.com 199.232.yy.yyy github.global.ssl.fastly.net
第三步:更新 DNS 緩存(僅限 Mac 用戶) Linux 用戶請(qǐng)忽略此步驟。
sudo dscacheutil -flushcache
在運(yùn)行dev_start.sh時(shí)有命令行加速選項(xiàng):
dev_start.sh --help OPTIONS: -h, --help Display this help and exit. -f, --fast Fast mode without pulling all map volumes. -g, --geo <us|cn|none> Pull docker image from geolocation specific registry mirror. -l, --local Use local docker image. -t, --tag <TAG> Specify docker image with tag <TAG> to start. -d, --dist Specify Apollo distribution(stable/testing) --shm-size <bytes> Size of /dev/shm . Passed directly to "docker run" -y Agree to Apollo License Agreement non-interactively. stop Stop all running Apollo containers.
是這個(gè)-g cn的選項(xiàng)可以加速?gòu)膰?guó)內(nèi)的鏡像站,而非dockerhub拉取鏡像。
dev_start.sh -g cn
現(xiàn)在啟動(dòng)apollo足夠爽了。
到此,關(guān)于“快速國(guó)內(nèi)代碼Repo和Docker鏡像的拉取怎么啟動(dòng)”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)?lái)更多實(shí)用的文章!
網(wǎng)站名稱:快速國(guó)內(nèi)代碼Repo和Docker鏡像的拉取怎么啟動(dòng)
轉(zhuǎn)載來(lái)于:http://aaarwkj.com/article8/ihpsip.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供Google、微信小程序、、外貿(mào)建站、網(wǎng)站改版、全網(wǎng)營(yíng)銷推廣
聲明:本網(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í)需注明來(lái)源: 創(chuàng)新互聯(lián)