[Docker Practical learning] 01 The basic concepts of docker

🐳 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
{
 "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.

contact 🔗

My github is @HANXU2018
My Chinese blog in CSDN site https://hanxu.blog.csdn.net/
✉️ google email [email protected]
📪QQ mailbox can get my reply faster
[email protected]

thanks
2020/5/18
🤝🤝🤝

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章