First, let’s understand what Docker is?
Docker is a container engine that can be used to deploy applications. With Docker, you can achieve rapid delivery, test and deploy code, and it is highly portable.
Docker mainly includes three basic concepts: mirror, container, and warehouse
Mirror: is a template used to create Docker containers, similar to the windows or linux system image we downloaded when installing a virtual machine.
Container: It is an independent running or a group of applications, which is an entity that mirrors the runtime. It is similar to when we install a Windows system on the virtual machine software, the running system is a container. The container can be created, started, stopped, deleted, suspended, etc.
Warehouse: used to store images
How to install Docker?
Take the centos system as an example:
{If you don’t have a linux server, you can install a virtual machine, a linux system on the machine, or buy a server from Alibaba Cloud or Tencent Cloud. If you are a beginner, it will only cost a few dozen yuan a year for a low configuration}
Use the following command to set up a stable repository.
$ sudo yum-config-manager \ --add-repo \ /linux/centos/
Use the command to install the latest versions of Docker Engine-Community and containerd:
sudo yum install docker-ce docker-ce-cli
Start Docker:
sudo systemctl start docker
Verify that Docker Engine-Community is installed correctly by running the hello-world image.
sudo docker run hello-world
At this point, the installation of Docker's environment has come to an end. If you want to install Docker on other Linux systems, you can refer to the above steps.
Next, you can do it yourself, use Docker to build MySQL, Tomcat, Nginx and other environments, and be proficient in some common commands and operations of docker. Some enterprises also use Docker for environment deployment. If you do tests and learn about some knowledge in this area, it will still be beneficial. If Docker is improved and advanced, you can learn together with Docker + Kubernetes (k8s for short).
Okay, this is all about this article about the simple method of building Docker environment. For more related content on building Docker environment, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!