发布和部署

2022-06-13  本文已影响0人  林立镇

🚚发布和部署

<article class="markdown-body" style="margin: 0px; padding: 0px; box-sizing: border-box; text-size-adjust: 100%; overflow-wrap: break-word; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 15px; line-height: 1.7; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">

镜像仓库介绍

镜像仓库用来存储我们 build 出来的“安装包”,Docker 官方提供了一个 镜像库,里面包含了大量镜像,基本各种软件所需依赖都有,要什么直接上去搜索。

我们也可以把自己 build 出来的镜像上传到 docker 提供的镜像库中,方便传播。
当然你也可以搭建自己的私有镜像库,或者使用国内各种大厂提供的镜像托管服务,例如:阿里云、腾讯云

本文档课件配套 视频教程

上传我们的镜像

docker-compose 中也可以直接用这个镜像了

<pre class="markdown-code-pre" style="margin: 0px 0px 16px; padding: 0px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12.75px; overflow-wrap: normal; background-color: rgb(246, 248, 250); border-radius: 3px; line-height: 1.45; overflow: auto; position: relative;">

`version: "3.7"

services:
app:

build: ./

image: helloguguji/test:v1
ports:

volumes:
redis:`

</pre>

阿里云容器托管

docker 官方的镜像托管有时候上传和下载都太慢了,如果你想要更快的速度,可以使用阿里云的免费镜像托管
登录 阿里云

[图片上传失败...(image-ccef86-1654046910251)]

</article>

转载自
Docker 快速入门

上一篇 下一篇

猜你喜欢

热点阅读