In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
I. Environmental choices
Containers require administrative tools, runtime, and operating systems, and our choices are as follows:
Docker Engine
Docker is the most popular and widely used.
runtime - runc
Docker's default runtime
operating system
centos7
Second, install Docker
Because the installation process requires internet access, the virtual machine must be able to access the internet.
Docker supports almost all Linux distributions, as well as Mac and Windows. The installation method of each operating system can be visited at docs.docker.com/engine/installation/
Docker is divided into an open-source CE (Community Edition) version and a fee-based EE (Enterprise Edition) version.
2.1 Install using repository
Before installing Docker CE for the first time on a new host, you need to set up the Docker repository. After that, you can install and update Docker from the repository.
settings repository
Install the required packages. Yum-utils provides yum-config-manager utility, and device-mapper-persistent-data and lvm2 by requiring devicmapper storage drivers.
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
2 Use the following command to set up a stable repository.
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo2.2 Install DOCKER CE
Install the latest versions of Docker CE and containerd, or go to the next step to install specific versions:
sudo yum install docker-ce docker-ce-cli containerd.io
To install a specific version of Docker CE, list the available versions in repo, then select and install:
One. Lists and sorts the versions available in your repository. This example sorts the results by version number, from highest to lowest.
yum list docker-ce --showduplicates | sort -r
Install specific docker-ce
sudo yum install docker-ce- docker-ce-cli- containerd.io
For example, yum install doceker-ce-18.06.0-ce-3.el7 containerd.io
2.3 Start docker service
sudo systemctl start dockersudo systemctl enable docker
Verify Docker CE is installed correctly by running the hello-world image.
sudo docker run hello-world
This command downloads the test image and runs it in the container. When the container runs, it prints an informational message and exits.
III. Operating container
Run the container as follows
docker run -d -p 80:80 httpd
The process is as follows:
1) Download httpd image from Docker Hub, Apache HTTP Server has been installed in the image
2)Start httpd container and map port 80 of container to port 80 of host
If you can see the following, the container is normal
use the accelerator
Since docker hub's server is abroad, downloading images will be slower. You can use DaoCloud to provide us with free domestic image services.
1) Register a user at daocloud.io for free
2) Login Click on the top menu "Accelerator"
Configure the accelerator as above and restart the docker service
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.