[Docker Practical learning] 01 The basic concepts of docker
π³ The content of docker's preliminary learning
- Basic concepts of Docker
- Install the Docker
- 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 on Ubuntu
- Docker have two types Community Edition(CE) and Enterprise Edition(EE), i select CE install on Ubuntu18.04
-
Update software
sudo apt-get update
-
apt-get some tools
sudo apt-get -y install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common
-
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"
-
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
-
we can check the docker version
docker version
-
China USES mirror access to speed up
- edit /etc/docker/daemon.json
sudo vi /etc/docker/daemon.json
- edit /etc/docker/daemon.json
{
"registry-mirrors": ["https://n6syp70m.mirror.aliyuncs.com"]
}
- 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
- Basic concepts of Docker
- Install the Docker
- 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 h1076998404@Gmial.com
πͺQQ mailbox can get my reply faster
1076998404@qq.com
thanks
2020/5/18
π€π€π€