前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >[Docker Practical learning] 01 The basic concepts of docker

[Docker Practical learning] 01 The basic concepts of docker

作者头像
韩旭051
发布2020-06-23 16:22:31
3590
发布2020-06-23 16:22:31
举报
文章被收录于专栏:刷题笔记

The content of docker’s preliminary learning

  1. Basic concepts of Docker
  2. Install the Docker
  3. Docker runs Hello World

The background of the docker

  • link : Docker Core technology preview
  • Before learning docker, I first learned about his historical background, which is of great help to my study.
  • Understanding the history can more quickly understand the direction of the development of technology and the essence of the way to use
  • This article introduces the technological development process of Docker, the core technologies in Docker and the related sub-projects, which is a good introduction.

Basic concepts of Docker

Container technology

  • The core ideas : Build once, Run anywhere.
  • Build,Ship and Run
  • Docker basic LXC developed by the go language.
  • Open source licenses :Apache2.0

Mirror container repository

  • images
    • Similar to a virtual machine images,Read-only template-independent file system
    • Can create container
    • Build based on DockerFile
    • It can be downloaded from Docker Hub(Docker Hub is similar to GitHub)
  • container
    • Similar to a virtual machine,can start stop delete …
    • Isolated from each other but not as effective as virtual machines
    • Control Groups and Namespace Implement isolation
      • CGroups: Access restrictions on CPU, memory, disk, and other resources
      • Namespaces :Provides isolation of system resources: processes, networks, file systems, and so on.
  • repository
    • It’s very similar to Git and GitHub that we learned about before.
    • Registry can save images .Docker Hub It’s so like a Git Hub.
    • Docker supports push and poll like Git。

Install the docker

  • Docker have two types Community Edition(CE) and Enterprise Edition(EE), i select CE install on Ubuntu18.04
  1. Update software sudo apt-get update
  2. apt-get some tools sudo apt-get -y install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common
  3. China’s special network adds a mirror image of aliyun curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
  4. install docker-engine sudo apt-cache madison docker-engine sudo apt-get remove docker docker-engine docker.io sudo apt-get install docker-ce
    • Check to see if the right version is available
    • remove the docker if out server already has a docker
    • Finally, the official installation of docker-ce
  5. we can check the docker version docker version
  6. China USES mirror access to speed up
    1. edit /etc/docker/daemon.json sudo vi /etc/docker/daemon.json
代码语言:javascript
复制
{
 "registry-mirrors": ["https://n6syp70m.mirror.aliyuncs.com"]
}
  1. sudo service docker restart

Try helloword with docker

docker container run hello-world run that command the docker will run and print hello world in terminal

conclusion

The content of docker’s preliminary learning

  1. Basic concepts of Docker
  2. Install the Docker
  3. Docker runs Hello World
  • This is the first time for me to record my study notes in English.
  • I’m trying really hard and I hope it’s a good start
  • I learn docker on this platform www.shiyanlou.com It’s not an AD but it works really well in Chinese The experiment costs one RMB per hour.But play docker with me is free
  • If you have any questions, please contact me.
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020/05/18 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • The background of the docker
  • Basic concepts of Docker
    • Container technology
      • Mirror container repository
        • Install the docker
          • Try helloword with docker
            • conclusion
            相关产品与服务
            容器服务
            腾讯云容器服务(Tencent Kubernetes Engine, TKE)基于原生 kubernetes 提供以容器为核心的、高度可扩展的高性能容器管理服务,覆盖 Serverless、边缘计算、分布式云等多种业务部署场景,业内首创单个集群兼容多种计算节点的容器资源管理模式。同时产品作为云原生 Finops 领先布道者,主导开源项目Crane,全面助力客户实现资源优化、成本控制。
            领券
            问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档