中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

哪幾個(gè)網(wǎng)站做acm題目最近幾天發(fā)生的新聞大事

哪幾個(gè)網(wǎng)站做acm題目,最近幾天發(fā)生的新聞大事,網(wǎng)站建設(shè)背景介紹,高級(jí)網(wǎng)站設(shè)計(jì)文章目錄 題目要求:一、創(chuàng)建文檔,編寫Dockerfile文件可以將harbor倉(cāng)庫(kù)去啟動(dòng)先起來(lái) 二、運(yùn)行Dockerfile,構(gòu)建nginx鏡像三、推送導(dǎo)私有倉(cāng)庫(kù),也就是我們的harbor倉(cāng)庫(kù) 題目要求: 編寫Dockerfile制作Web應(yīng)用系統(tǒng)nginx鏡像…

文章目錄

  • 題目要求:
  • 一、創(chuàng)建文檔,編寫Dockerfile文件
    • 可以將harbor倉(cāng)庫(kù)去啟動(dòng)先起來(lái)
  • 二、運(yùn)行Dockerfile,構(gòu)建nginx鏡像
  • 三、推送導(dǎo)私有倉(cāng)庫(kù),也就是我們的harbor倉(cāng)庫(kù)


題目要求:

編寫Dockerfile制作Web應(yīng)用系統(tǒng)nginx鏡像,生成鏡像nginx:v1.1,并推送其到私有倉(cāng)庫(kù)。具體要求如下:

  1. 基于centos基礎(chǔ)鏡像;
  2. 指定作者信息;
  3. 安裝nginx服務(wù),將提供的dest目錄(提供默認(rèn)主頁(yè)index.html)傳到鏡像內(nèi),并將dest目錄內(nèi)的前端文件復(fù)制到nginx的工作目錄;
  4. 暴露80端口;
  5. 設(shè)置服務(wù)自啟動(dòng)。
  6. 驗(yàn)證鏡像。

一、創(chuàng)建文檔,編寫Dockerfile文件

1、創(chuàng)建文檔來(lái)存放本次需要寫入的東西
[root@redhat ~]# mkdir -p dockertest
[root@redhat ~]# 
[root@redhat ~]# cd dockertest/
[root@redhat dockertest]# 
[root@redhat dockertest]# mkidr test1
[root@redhat dockertest]# cd test1/
2、編寫一個(gè)html的前端文件,內(nèi)容隨便
[root@redhat test1]# vim index.html
[root@redhat test1]# 
[root@redhat test1]# cat index.html 
hello hello hello hello hello hello hello
3、編寫Dockerfile
[root@redhat test1]# vim Dockerfile
[root@redhat test1]# cat Dockerfile 
FROM centos   //題目要求從cetenos鏡像
MAINTAINER "Tej <Tej@163.com>" //指定的是創(chuàng)建這個(gè)鏡像的作者信息
ADD http://nginx.org/download/nginx-1.24.0tar.gz /usr/local/src  //類似于copy指令,支持使用TAR文件和URL路徑
COPY index.html /usr/share/nginx/  // 從上下文目錄中復(fù)制文件或目錄到容器里指定的路徑
EXPOSE 80 // 端口號(hào)為80端口
CMD ["/usr/sbin/nginx","-g","daemon off"] // CMD指令的首要目的在于為啟動(dòng)的容器指定默認(rèn)要運(yùn)行的程序,且其運(yùn)行結(jié)束后,容器也將終止;不過(guò),CMD指定的命令可以被docker run的命令行選項(xiàng)所覆蓋

可以將harbor倉(cāng)庫(kù)去啟動(dòng)先起來(lái)

[root@redhat ~]# cd /usr/local/harbor/
[root@redhat harbor]# ls
common     docker-compose.yml    harbor.yml       install.sh  prepare
common.sh  harbor.v2.4.1.tar.gz  harbor.yml.tmpl  LICENSE
[root@redhat harbor]# 
[root@redhat harbor]# ./install.sh 
輸入./install.sh 就行,之前的密碼和賬戶都沒(méi)有發(fā)生改變,不要看見(jiàn)remove就急忙退出了,他只是在重新啟動(dòng),

在這里插入圖片描述

二、運(yùn)行Dockerfile,構(gòu)建nginx鏡像

[root@redhat test1]# vim Dockerfile 
[root@redhat test1]# docker build -t nginx:v1.1 ./
[+] Building 43.8s (9/9) FINISHED   

在這里插入圖片描述
出現(xiàn)這個(gè)界面就表示nginx安裝成功了,如果不放心的可以去docker images查看,看鏡像是否運(yùn)行了。

三、推送導(dǎo)私有倉(cāng)庫(kù),也就是我們的harbor倉(cāng)庫(kù)

在harbor倉(cāng)庫(kù)里新建一個(gè)項(xiàng)目, 我這里是叫test1,創(chuàng)建項(xiàng)目就在界面最顯眼的地方,下面第一張圖就是默認(rèn)的,第二張就是已經(jīng)創(chuàng)建好了的。
在這里插入圖片描述

在這里插入圖片描述

#首先登錄到私有倉(cāng)庫(kù)
[root@node2 demo01]# docker login -u admin -p Harbor12345 192.168.198.200
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-storeLogin Succeeded#給鏡像打上合適的標(biāo)簽
[root@node2 demo01]# docker tag nginx:v1.1 192.168.198.200/test1/nginx
[root@redhat ~]# docker images | grep test1
192.168.11.131/test1/nginx      v1.1      d24d91713c2d   56 minutes ago   232MB#推送鏡像到私有倉(cāng)庫(kù)
[root@node2 demo01]# docker push 192.168.198.200/test1/nginx:v1.1
The push refers to repository [192.168.198.200:80/demo01/nginx]
02dfab95c1be: Pushed 
74ddd0ec08fa: Pushed 
v1.1: digest: sha256:888ed81c26b452ff94686c7709f1a6b668aeb2f2f7f80e4225eb83257428a8a7 size: 736
[root@node2 demo01]#

在這里插入圖片描述

傳輸完畢!


http://www.risenshineclean.com/news/60695.html

相關(guān)文章:

  • 網(wǎng)站建設(shè)費(fèi)用 優(yōu)幫云杭州做seo的公司
  • 朝陽(yáng)專業(yè)網(wǎng)站建設(shè)靜態(tài)網(wǎng)頁(yè)設(shè)計(jì)與制作
  • 交城有做網(wǎng)站的嗎品牌營(yíng)銷是什么
  • wordpress支付文件在哪seo網(wǎng)上培訓(xùn)課程
  • 怎么制作黃色網(wǎng)站中國(guó)北京出啥大事了
  • 怎么增加網(wǎng)站的外鏈網(wǎng)站流量分析工具
  • 明星用什么軟件做視頻網(wǎng)站友情鏈接方面
  • 開(kāi)設(shè)公司網(wǎng)站愛(ài)站關(guān)鍵詞
  • 百度網(wǎng)站如何做網(wǎng)絡(luò)營(yíng)銷的方式
  • 建個(gè)網(wǎng)站費(fèi)用微信管理系統(tǒng)軟件
  • 閘北區(qū)網(wǎng)站設(shè)計(jì)與制優(yōu)化推廣網(wǎng)站怎么做最好
  • 網(wǎng)站投訴平臺(tái)公眾號(hào)軟文素材
  • 學(xué)做餅干網(wǎng)站全球網(wǎng)站流量排名100
  • 揚(yáng)州做網(wǎng)站需要多少錢搜索引擎優(yōu)化需要多少錢
  • 網(wǎng)頁(yè)設(shè)計(jì)與制作建立站點(diǎn)實(shí)踐報(bào)告怎么開(kāi)發(fā)一個(gè)網(wǎng)站
  • 做百度移動(dòng)端網(wǎng)站營(yíng)銷服務(wù)機(jī)構(gòu)
  • 網(wǎng)站有哪些后臺(tái)寧波seo優(yōu)化
  • 合肥怎么做網(wǎng)站高平網(wǎng)站優(yōu)化公司
  • 網(wǎng)站改版會(huì)影響排名嗎營(yíng)銷方法
  • 濟(jì)南建設(shè)網(wǎng)站阿里巴巴國(guó)際站運(yùn)營(yíng)
  • 成都網(wǎng)站建設(shè)公司興田德潤(rùn)在哪兒個(gè)人發(fā)布信息的免費(fèi)平臺(tái)
  • wordpress雙域名重慶網(wǎng)站排名優(yōu)化教程
  • 泉州做網(wǎng)站優(yōu)化公司建站模板哪個(gè)好
  • wordpress 彩色標(biāo)簽云 插件windows優(yōu)化大師電腦版
  • 做網(wǎng)站運(yùn)營(yíng)有前景嗎愛(ài)站長(zhǎng)尾詞
  • wordpress創(chuàng)建子目錄win7一鍵優(yōu)化工具
  • 美國(guó)哪個(gè)網(wǎng)站做diy電腦版怎么建立公司網(wǎng)站
  • 商城類網(wǎng)站建設(shè) 數(shù)據(jù)庫(kù)推廣賺錢一個(gè)2元
  • 貴陽(yáng)做網(wǎng)站 優(yōu)幫云產(chǎn)品推廣計(jì)劃書(shū)怎么寫
  • 南昌專業(yè)做網(wǎng)站公司seminar是什么意思