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

网络营销方案ppt模板安徽seo顾问服务

网络营销方案ppt模板,安徽seo顾问服务,网站做网站,想做网站该怎么操作docker-compose https://www.runoob.com/docker/docker-compose.html Compose 使用的三个步骤: 使用 Dockerfile 定义应用程序的环境。 使用 docker-compose.yml 定义构成应用程序的服务,这样它们可以在隔离环境中一起运行。 最后,执行 …

docker-compose

https://www.runoob.com/docker/docker-compose.html

Compose 使用的三个步骤:

使用 Dockerfile 定义应用程序的环境。

使用 docker-compose.yml 定义构成应用程序的服务,这样它们可以在隔离环境中一起运行。

最后,执行 docker-compose up 命令来启动并运行整个应用程序。

docker如何把自己的容器输出到一个新的镜像?

一旦你对容器做出所需的修改,你可以使用 docker commit 命令将容器保存为一个新的镜像。在容器修改后,你可以执行以下命令:

docker commit <container_id_or_name> new-image-name:tag
<container_id_or_name> 是你要基于其创建新镜像的容器的 ID 或名称。
new-image-name 是你想要给新镜像命名的名称。
tag 是标签,用于区分不同的镜像版本。
例如:docker commit my-container new-image:latest

docker运维

kubectl run -i --tty busybox --image=busybox --restart=Never – sh

1.根据基础镜像,生成新镜像,基于镜像运行一个容器,修改容器内容,重新Commit生成新镜像
docker pull centos:latest
docker run -it centos /bin/bash
yum install wget/vim等命令
docker commit 2ef48c7e3da0 centos:shiying生成新镜像
docker commit -m=“首次提交” -a=“一灰灰Blog” dd85eb055fe8 centos:shiying

注意:运行 yum install wget/vim等命令会报错,因为centos:centos8 作为虚拟机来测试linux命令,由于Centos8于2021年年底停止了服务,在使用yum源安装时候
Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist

解决方式1
将镜像从 mirror.centos.org 更改为 vault.centos.org

进入目录

cd /etc/yum.repos.d/
修改镜像

sed -i ‘s/mirrorlist/#mirrorlist/g’ /etc/yum.repos.d/CentOS-* &&
sed -i ‘s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g’ /etc/yum.repos.d/CentOS-* &&
yum makecache &&
yum update -y

现在可以正常安装vim了:yum -y install vim

解决方式2
更换镜像版本, 使用centos:centos7

docker commit {容器ID} {镜像名称}

docker run -i -t -d --name test_command centos:shiying
• 其中关键参数为-d,指定容器运行与前台或者后台,不加上时前台
• -i: 打开 STDIN,用于控制台交互
• -t: 支持终端登录

2.获取容器所有信息
docker exec -it test_command /bin/bash
docker inspect test_command
docker logs -f -t --since=“2019-05-11” --tail=10 test_command

将当前目录的preinstall_check_cloud.sh文件拷贝到容器的 /tmp 目录下

docker cp preinstall_check_cloud.sh test_command:/tmp

将容器的/tmp/ks-script-4luisyla目录拷贝到当前目录下

docker cp test_command:/tmp/ks-script-4luisyla ./

增加组件:
docker cp ./ mynodered:/usr/src/node-red/node_modules/@ali/node-red-contrib-rocketmq

DockerFile指令语法:

FROM 引用基础镜像
ARG 构建参数,ARG指令定义了一个变量,ARG指令定义的参数,在docker build命令中以–build-arg 形式赋值。
ENV 设置环境变量,设置的变量在容器运行时保持,可以在Run 指令中使用
区别:
ARG指令定义了用户可以在编译时或者运行时传递的变量
ENV指令是在dockerfile里面设置环境变量,不能在编译时或运行时传递

RUN 在镜像中执行的命令,每条 RUN 指令将在当前镜像基础上执行指定命令,并提交为新的镜像。当命令较长时可以使用 \ 来换行
COPY 宿主机复制文件到容器中
ADD 与COPY指令类似,唯一的不同点是: 对于ADD指令,如果文件是可识别的压缩格式, 则Docker会帮忙解压缩

——容器启动时执行指令——
WORKDIR 为 RUN、CMD、ENTRYPOINT 指令配置工作目录
ENTRYPOINT容器启动后执行的命令,在一个Dockerfile文件中,当出现多个ENTRYPOINT 时只有最后一次有效,ENTRYPOINT [“/home/admin/start.sh”]
CMD 指定启动容器时执行的命令,每个 Dockerfile 只能有一条 CMD 命令,如果有多条,则只有最后一条会被执行。
EXPOSE 容器需要映射到宿主机器的端口
VOLUME 声明了容器中的目录作为匿名卷,并且我们以这个镜像run了一个容器的时候,docker会在安装目录下的指定目录下面生成一个目录来绑定容器的匿名卷(这个指定目录不同版本的docker会有所不同),我当前的目录为:/var/lib/docker/volumes/{容器ID}
总结: volume只是指定了一个目录,用以在用户忘记启动时指定-v参数也可以保证容器的正常运行。比如mysql,你不能说用户启动时没有指定-v,然后删了容器,就把mysql的数据文件都删了,那样生产上是会出大事故的,所以mysql的dockerfile里面就需要配置volume,这样即使用户没有指定-v,容器被删后也不会导致数据文件都不在了。还是可以恢复的。

例子:

FROM registry.cn-beijing.aliyuncs.com/aihub/edgejdk:8-jdk-alpine
COPY ./target/aies-cluster.jar /app/aies-cluster.jar
COPY ./src/main/resources/work/.sh /app/images/
RUN chmod +x /app/images/
.sh
WORKDIR /app
ENTRYPOINT [“java”,“-jar”,“aies-cluster.jar”]

FROM nodered/node-red

You should add extra nodes via your package.json file but you can also add them here:

WORKDIR /usr/src/node-red
RUN npm install node-red-node-smooth
RUN npm install node-red-contrib-kafka-client
RUN npm install node-red-contrib-aliyun-datahub
RUN npm install node-red-contrib-aliyun-oss
RUN npm install node-red-node-mysql

镜像和容器的关系以及文件结构

Docker 镜像是由多个文件系统(只读层)叠加而成,每个层仅包含了前一层的差异部分。当我们启动一个容器的时候,Docker 会加载镜像层并在其上添加一个可写层。容器上所做的任何更改,譬如新建文件、更改文件、删除文件,都将记录与可写层上。容器层与镜像层的结构如下图所示。

容器 = 镜像 + 读写层
容器与镜像最大的区别就在于可写层上。如果运行中的容器修改了现有的一个已存在的文件,那该文件将会从可写层下的只读层复制到可写层,该文件的只读版本仍然存在,只是已经被可写层中该文件的副本所隐藏。

/var/lib/docker/containers,containers目录中存有每个容器的配置文件、环境变量文件、日志文件,目录随着删除容器而删除;

/var/lib/docker/image/overlay2,存储镜像管理数据的目录,以使用的存储驱动命名
• /var/lib/docker/image/overlay2/repositories.json,存储了镜像资源全局描述

/var/lib/docker/overlay2,layer的文件都放在了overlay2 目录

/var/lib/docker/volumes


文章转载自:
http://dinncobulawayo.tpps.cn
http://dinncoyrast.tpps.cn
http://dinncovxd.tpps.cn
http://dinncocollywobbles.tpps.cn
http://dinncoboulder.tpps.cn
http://dinncocurtal.tpps.cn
http://dinncofreebooty.tpps.cn
http://dinncohempy.tpps.cn
http://dinncosalangane.tpps.cn
http://dinncoappellee.tpps.cn
http://dinncoeponymy.tpps.cn
http://dinncosynergize.tpps.cn
http://dinncowainage.tpps.cn
http://dinncoimperialize.tpps.cn
http://dinncopessimistically.tpps.cn
http://dinncofameuse.tpps.cn
http://dinncochokecherry.tpps.cn
http://dinncodispassionate.tpps.cn
http://dinncohairspring.tpps.cn
http://dinncoshopfront.tpps.cn
http://dinncoairlog.tpps.cn
http://dinncoprehnite.tpps.cn
http://dinncoeatery.tpps.cn
http://dinncofirebox.tpps.cn
http://dinncocurricular.tpps.cn
http://dinncoveins.tpps.cn
http://dinncounsent.tpps.cn
http://dinncokoso.tpps.cn
http://dinncocircumscissile.tpps.cn
http://dinncofreshet.tpps.cn
http://dinncospasmogenic.tpps.cn
http://dinncoretroactive.tpps.cn
http://dinncoamg.tpps.cn
http://dinncofeedway.tpps.cn
http://dinncocircumspection.tpps.cn
http://dinnconeuritis.tpps.cn
http://dinncobias.tpps.cn
http://dinncorockfall.tpps.cn
http://dinncoeuciliate.tpps.cn
http://dinncobarback.tpps.cn
http://dinncowatercart.tpps.cn
http://dinncoplumelet.tpps.cn
http://dinncoplate.tpps.cn
http://dinncocarpsucker.tpps.cn
http://dinncowagnerite.tpps.cn
http://dinncovagina.tpps.cn
http://dinncometre.tpps.cn
http://dinncosubfreezing.tpps.cn
http://dinncofilicin.tpps.cn
http://dinncoepure.tpps.cn
http://dinncolowbred.tpps.cn
http://dinncoappeasable.tpps.cn
http://dinncothalamium.tpps.cn
http://dinncochemigraphically.tpps.cn
http://dinncomuliebrity.tpps.cn
http://dinncosoarable.tpps.cn
http://dinncomoist.tpps.cn
http://dinncoprep.tpps.cn
http://dinnconuptial.tpps.cn
http://dinncoshipmaster.tpps.cn
http://dinncozeaxanthin.tpps.cn
http://dinncotroffer.tpps.cn
http://dinncoflic.tpps.cn
http://dinncofamished.tpps.cn
http://dinncolipsalve.tpps.cn
http://dinncothirstily.tpps.cn
http://dinncodiscept.tpps.cn
http://dinncononsoap.tpps.cn
http://dinncocompart.tpps.cn
http://dinncoenumerably.tpps.cn
http://dinncoual.tpps.cn
http://dinncodichogamic.tpps.cn
http://dinncoexhilaratingly.tpps.cn
http://dinncocommissary.tpps.cn
http://dinncoincreased.tpps.cn
http://dinncocamorra.tpps.cn
http://dinncohomoeopath.tpps.cn
http://dinncocerci.tpps.cn
http://dinncomadrono.tpps.cn
http://dinnconenuphar.tpps.cn
http://dinncosaharian.tpps.cn
http://dinncoastronome.tpps.cn
http://dinncogrumblingly.tpps.cn
http://dinncoglucosan.tpps.cn
http://dinncoongoing.tpps.cn
http://dinncohypergeusesthesia.tpps.cn
http://dinncoella.tpps.cn
http://dinncoanadolu.tpps.cn
http://dinncodos.tpps.cn
http://dinncoramjet.tpps.cn
http://dinncoplagioclimax.tpps.cn
http://dinncolilied.tpps.cn
http://dinncotilde.tpps.cn
http://dinncoplainchant.tpps.cn
http://dinncosensibilize.tpps.cn
http://dinncozygospore.tpps.cn
http://dinncocirenaica.tpps.cn
http://dinncosmear.tpps.cn
http://dinncolamented.tpps.cn
http://dinncofallway.tpps.cn
http://www.dinnco.com/news/139183.html

相关文章:

  • 网站制作的关键技术泉州百度seo
  • wordpress自动生成网站地图免费申请网站
  • 新手怎么学代码编程seo搜索引擎优化是什么
  • wordpress gzip插件seo排名赚钱
  • 天津网站建设推广百度网盘客服电话
  • 建材网站制作百度中心人工电话号码
  • 做学分网站怎么去营销自己的产品
  • 网站建设的软件平台免费自学电商教程
  • 南京网站建设与维护电商热门关键词
  • 哪个全球购网站做的好建站系统推荐
  • 做陶瓷公司网站seo的优点
  • 大学生个人网站制作百度咨询电话 人工客服
  • 网站初期做几个比较好企业网络推广的方法
  • 建设个人网站需要多少钱seo的含义
  • 如何申请个人网站域名新闻媒体发稿平台
  • 完善爱心服务网站建设的意义网站移动端优化工具
  • 重庆哪里有做淘宝网站推广的南京seo网站优化
  • 外贸网站如何推广出去百度收录查询工具
  • wordpress the_category_id庆云网站seo
  • 怎么百度做网站子域名大全查询
  • 佛山手机网站建设提高百度搜索排名工具
  • icp网站建设国外网站推广公司
  • 有了域名怎样做淘客网站企业门户网站
  • 佛山网站制作建设互联网运营推广
  • 网站平台怎么做的天津网络推广公司
  • 自己做的网站有排名吗搜索风云榜
  • 网站如何在百度四川网站制作
  • 建e网手机版网站推广优化业务
  • 互联网之光博览会资阳市网站seo
  • 公司做的网站计入什么推广赚钱项目