Coder Social home page Coder Social logo

docker-go's Introduction

docker 是一个合格程序猿会用的工具

docker是一个开源的应用的容器引擎,可以获取镜像,启动相应容器,就是相应的服务。

情景一:比如我要开启一个redis服务,我就用docker pull 拉去redis镜像,在根据redis镜像开启一个容器,容器打开一个端口,我可以根据这个端口进行访问容器。容器会提供一个redis服务。

情景二:比如我要开启redis集群服务,要多个服务器,进行情景部署 。开发的时候不可能给你6个服务器,然后你在上面部署 然后在进行开发,开发难度会提高。docker的一个容器就是一个小型的虚拟机,你可以一次性开多个redis服务容器,进行部署。和服务器一模一样,提高开发效率。

Docker和虚拟机的不同

1.资源的使用率不同

  • 虚拟机启动需要数分钟。占用大量磁盘空间及系统资源。

  • Docker容器可以在数毫秒内完成启动。

    由于没有臃肿的从操作系统,Docker可以节省大量的磁盘空间以及其他系统资源。

2.应用场景不同

  • 虚拟机擅长彻底隔离整个运行环境。如: 云服务提供商通常采用虚拟机技术隔离不同的用户。
  • Docker通常用于隔离不同的应用。例如前端,后端以及数据库。

相同点

以上两种虚拟化技术都属于软件虚拟化,在现有的物理平台上实现对物理平台访问的截获和模拟。有些软件虚拟技术不需要硬件支持;而有些则依赖硬件支持。

我在学习docker里面有安装和基础,和部分案例

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.