[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
1、Docker初始
Docker如日中天,这不是单纯的炒概念,Docker的的确确解决了开发与运维的痛点,因此在企业开发中得到了非常广泛的应用,本文对于Docker的基本知识点做一些简单梳理。
1. 什么是docker
1.1. Docker 简介
Docker是一个开放源代码软件项目,基于GO语言
Docker可以让开发者打包他们的应用以及依赖包到一个轻量级、可移植的容器中
Docker打包好了的容器,可以发布到任何流行的Linux 机器上,也可以实现虚拟化
容器是完全使用沙箱机制,相互之间不会有任何接口(类似 iPhone 的 app)
Docker容器性能开销极低,这个才是关键
Docker 从 17.03 版本之后分为 CE(CommunityEdition: 社区版) 和 EE(Enterprise Edition: 企业
版),我们用社区版就可以了
Docker 使用客户端-服务器 (C/S) 架构模式,使用远程API来管理和创建Docker容器。
1.2. Docker简介
1.2.1 简化部署
传统的软件开发与发布环境复杂,配置繁琐,经常有同学问:我的代码在开发环境可以运行,一旦部署到服务器上就运行不了了。这是一个非常常见的问题,现实中,同一个系统在不同的环境中部署(开发环境、测试环境、生产环境等),每一个环节都有可能出现各种问题,如Mysql在测试环境安装报错,在开发环境下安装正常,我们往往在这方面浪费很多