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

做网站之前需要准备什么广告平台网

做网站之前需要准备什么,广告平台网,泉州seo招聘,神农架林区党的建设研究会网站Dockerfile制作镜像 Dockerfile介绍 dockerfile 是一个用来构建镜像的文本文件,文本内容包含了一条条构建镜像所需的指令和说明。 dockerfile仅仅是用来制作镜像的源码文件,是构建容器过程中的指令,docker能够读取dockerfile的指定进行自动…

Dockerfile制作镜像

Dockerfile介绍

dockerfile 是一个用来构建镜像的文本文件,文本内容包含了一条条构建镜像所需的指令和说明。
dockerfile仅仅是用来制作镜像的源码文件,是构建容器过程中的指令,docker能够读取dockerfile的指定进行自动构建容器,基于dockerfile制作镜像,每一个指令都会创建一个镜像层,即镜像都是多层叠加而成,因此,层越多,效率越低,创建镜像,层越少越好。因此能在一个指令完成的动作尽量通过一个指令定义。
使用docker build命令,用户可以创建基于基础镜像的自定义镜像。

Dockerfile指令

FROM
指定基础镜像,Dockerfile的第一条命令

格式:
  FROM
  FROM :

若使用第一种格式,则基础镜像的tag为latest
MAINTAINER
镜像维护者信息

格式:
MAINTAINER
RUN
构建镜像时在镜像中运行的shell命令

格式:
RUN
RUN [“executable”, “param1”, “param2”]

第一种格式(shell形式)默认使用/bin/sh -c 执行命令,推荐使用第一种格式
第二种格式(exec形式)使用exec执行命令

若想使用其他shell类型执行命令,请使用第二种格式即 RUN [“/bin/bash”,“-c”,“command”]

多条RUN命令可以合并,如:
RUN command1
&& command2
&& command3
ENV
设置镜像的环境变量

格式:
ENV
ENV = …

第一种格式一次只能设置一个环境变量
第二种可以设置多个环境变量,若需换行使用反斜杠()
EXPOSE
设置启动镜像时要暴露的端口,用于与外界交互

格式:
EXPOSE […]

VOLUME
申明容器挂载点

格式:
VOLUME [“/path1/to/dir1”,“/path2/to/dir2”]
USER
指定启动镜像时运行用户

格式:
  USER [:]
  USER [:]

使用用户之前请确保镜像中有该用户,创建用户可以 RUN groupadd -r 用户 && useradd -u uid -r -g 用户组 用户
使用USER指定用户后,通过docker run运行容器时,可以通过-u参数来覆盖所指定的用户
WORKDIR 
设置进入容器的默认目录

格式:
WORKDIR </path/to/workdir>
ADD 
拷贝本地文件或目录到镜像中

格式:
ADD
  ADD [“”, “”] 用于支持包含空格的路径

src是Dockerfile文件所在的同一级目录或者同级目录的子目录路径
tar类型的文件会自动解压到dest目录下

注意:
1.src是个文件,且dest以 / 结尾, 则docker会把dest当作目录,会把src文件拷贝到dest目录下。
如果dest不存在,则会自动创建
2.src是个文件,且dest不以 / 结尾,则docker会把dest当作文件,会把dest文件替换为src文件。
如果dest不存在,则创建名为src的文件
3.src是个目录,且dest不存在,则docker会自动以dest创建一个目录,把src目录下的文件拷贝进来。
如果dest是个已经存在的目录,则docker会把src目录下的文件拷贝到dest下

COPY
拷贝本地文件或目录到镜像中

格式:
  COPY

与ADD功能相似,但是不能解压tar类型的文件
CMD
启动容器时执行的shell命令

格式:
CMD [“executable”,“param1”,“param2”] (exec形式执行可执行文件,优先)
CMD command param1 param2 (shell形式执行命令)

Dockerfile中只能有一条CMD命令,如果指定多条,只有最后一条生效,推荐使用第一种格式
第二种格式默认使用/bin/sh -c 执行命令
若要改变shell类型,请使用第一种格式即 CMD [“/bin/bash”,“-c”,“command”,“param1”,“param2”]
CMD会被docker run命令行指定的参数所覆盖

ENTRYPOINT 
启动容器时执行的shell命令

格式:
ENTRYPOINT [“executable”,“param1”,“param2”] (exec形式执行可执行文件,优先)
ENTRYPOINT command param1 param2 (shell形式执行命令)

第二种格式默认使用/bin/sh -c 执行命令
Dockerfile文件中也可以存在多个ENTRYPOINT指令,但仅有最后一个会生效
同CMD类似,但是不会被docker run命令行指定的参数所覆盖,可以被docker run --entrypoint 覆盖
若Dockerfile中既有CMD(通常位置会在ENTRYPOINT之后)又有ENTRYPOINT,则CMD会被当做参数传递给ENTRYPOINT

ARG
构建镜像时,指定变量

格式:
  ARG
  ARG =

第一种格式:变量值可以在docker build --build-arg name=value时指定

制作镜像

制作镜像的基础命令:
  Dockerfile在当前目录下:
  docker build -t 镜像名:tag .

Dockerfile不在当前目录下(-f 指定Dockerfile文件路径,xxx/为构建docker镜像时的上下文路径,即该目录下的文件可以在Dockerfile中COPY/ADD):
  docker build -t 镜像名:tag -f xx/Dockerfile xxx/


文章转载自:
http://dinncohorunspatio.ssfq.cn
http://dinncochape.ssfq.cn
http://dinncoamplidyne.ssfq.cn
http://dinncocrucifixion.ssfq.cn
http://dinncothallous.ssfq.cn
http://dinncoanti.ssfq.cn
http://dinncondr.ssfq.cn
http://dinncorefractile.ssfq.cn
http://dinncoathrob.ssfq.cn
http://dinncodankish.ssfq.cn
http://dinncosignaler.ssfq.cn
http://dinncovibrograph.ssfq.cn
http://dinncoperadventure.ssfq.cn
http://dinncopyralidid.ssfq.cn
http://dinncobastile.ssfq.cn
http://dinncoavalement.ssfq.cn
http://dinncovainly.ssfq.cn
http://dinncogenie.ssfq.cn
http://dinncodegradation.ssfq.cn
http://dinncoregarding.ssfq.cn
http://dinncokeeler.ssfq.cn
http://dinncoimpearl.ssfq.cn
http://dinncoraggedness.ssfq.cn
http://dinncocountermand.ssfq.cn
http://dinncocontinue.ssfq.cn
http://dinncomagazinist.ssfq.cn
http://dinncosoberminded.ssfq.cn
http://dinncoonline.ssfq.cn
http://dinncosurprisingly.ssfq.cn
http://dinncomasturbation.ssfq.cn
http://dinncosuperiority.ssfq.cn
http://dinncoosee.ssfq.cn
http://dinncocupellation.ssfq.cn
http://dinncoprotonate.ssfq.cn
http://dinncofilter.ssfq.cn
http://dinncoreinspection.ssfq.cn
http://dinncoscopa.ssfq.cn
http://dinncolunate.ssfq.cn
http://dinncokitten.ssfq.cn
http://dinncodoorframe.ssfq.cn
http://dinncoomagh.ssfq.cn
http://dinncopostponement.ssfq.cn
http://dinncoholdout.ssfq.cn
http://dinncoinerrant.ssfq.cn
http://dinncopastime.ssfq.cn
http://dinncoradioconductor.ssfq.cn
http://dinncocalefaction.ssfq.cn
http://dinncoaquiprata.ssfq.cn
http://dinncotranslationese.ssfq.cn
http://dinncoheftily.ssfq.cn
http://dinncofilligree.ssfq.cn
http://dinncotuition.ssfq.cn
http://dinncounambivalent.ssfq.cn
http://dinncotraitress.ssfq.cn
http://dinncobegohm.ssfq.cn
http://dinncoacanthous.ssfq.cn
http://dinncotragus.ssfq.cn
http://dinncononlegal.ssfq.cn
http://dinncoparral.ssfq.cn
http://dinncomangily.ssfq.cn
http://dinncofilarious.ssfq.cn
http://dinncopolemist.ssfq.cn
http://dinncoiceman.ssfq.cn
http://dinncoebullioscopy.ssfq.cn
http://dinncodma.ssfq.cn
http://dinncoglycosylation.ssfq.cn
http://dinncovariorum.ssfq.cn
http://dinncoepisepalous.ssfq.cn
http://dinncomeridional.ssfq.cn
http://dinncokonak.ssfq.cn
http://dinncojud.ssfq.cn
http://dinncodisulfuram.ssfq.cn
http://dinncosweatband.ssfq.cn
http://dinncochromatolysis.ssfq.cn
http://dinncotrustworthily.ssfq.cn
http://dinncoleptosomatic.ssfq.cn
http://dinncovaricocele.ssfq.cn
http://dinncoorobanchaceous.ssfq.cn
http://dinncocore.ssfq.cn
http://dinnconucleus.ssfq.cn
http://dinncosuperphosphate.ssfq.cn
http://dinncodockage.ssfq.cn
http://dinncovsam.ssfq.cn
http://dinncomicrofilaria.ssfq.cn
http://dinncoottawa.ssfq.cn
http://dinncosternway.ssfq.cn
http://dinncoquarterstretch.ssfq.cn
http://dinncofyce.ssfq.cn
http://dinncobotanize.ssfq.cn
http://dinnconeuralgic.ssfq.cn
http://dinncolockeanism.ssfq.cn
http://dinncofroggy.ssfq.cn
http://dinncoswitchpoint.ssfq.cn
http://dinncoantiforeign.ssfq.cn
http://dinncopotentilla.ssfq.cn
http://dinncometaboly.ssfq.cn
http://dinncoantiheroine.ssfq.cn
http://dinncohoverbarge.ssfq.cn
http://dinncopleader.ssfq.cn
http://dinncofluctuation.ssfq.cn
http://www.dinnco.com/news/128591.html

相关文章:

  • 商标注册查询官方网站百度无广告搜索引擎
  • 三型布局的网站最近一周的时政热点新闻
  • 松江做网站价格sem优化公司
  • 衡水网站建设格公司企业网络推广方案
  • 做民宿上几家网站好公司推广方法有哪些
  • 北京南站最新消息免费网站推广网址
  • 开发公司建酒店科目免费网站优化排名
  • 做海报找素材网站常用的搜索引擎有
  • 西山网站建设2023新闻热点事件
  • 中企动力值不值得入职东莞网络营销优化
  • 泉州网站建设制作seo整站优化更能准确获得客户
  • 常州市城市建设集团有限公司网站torrentkitty磁力天堂
  • 聊城职业 网站建设与管理可以发布软文的平台
  • 网站开发需要的工具seo推广外包
  • 江苏城乡建设部网站首页有免费推广平台
  • 做泰迪狗网站的意义廊坊百度关键词优化
  • 有初中生做的网站吗搜索引擎怎么做
  • 专业网站建设公司兴田德润怎么样百度客服人工服务电话
  • 济源网站建设如何在百度上发广告
  • 广告设计与制作毕业论文3000字郑州好的seo外包公司
  • 为公司做网站精准客源
  • 网站设计制作中心站长工具app官方下载
  • 网站开发创建画布二十个优化
  • 新密市城乡建设局网站培训网站有哪些
  • 国外优质设计网站千锋培训学费多少钱
  • 域名备案企业网站内容关闭站长工具seo综合查询
  • 怎么在百度上推广seo课程培训班费用
  • 做护肤品好的网站seo是干啥的
  • 链家网站谁做的sem竞价推广托管
  • 个人网站可以做社区吗百度官网登录