In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article focuses on "how to quickly build a Docker environment based on ECS". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to quickly build a Docker environment based on ECS.
Scene introduction
The tutorial shows you how to quickly build a Docker environment and deploy a Nginx service using Docker.
Background knowledge
Container technology
A container is a lightweight, operating system-level virtualization technology that allows us to run applications and their dependencies during resource isolation. All necessary components needed to run applications are packaged into a single image that can be reused. When the mirror runs, it runs in a separate environment and does not share the memory, CPU, or disk of the host operating system with other applications. This ensures that processes within the container do not affect any processes outside the container.
Docker
Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable container, then publish them to any popular Linux or Windows machine, or virtualize them. Containers are completely sandboxed and do not have any interface to each other. Docker uses Linux's cgroup and namespace technologies to achieve application isolation. A complete Docker consists of the following parts:
Docker Client client Docker Daemon daemon Docker Image mirroring Docker Container container
Step 1: connect to the ECS server
Ali Yunyun product resource experience address: https://developer.aliyun.com/adc/scenario/9fd79b8711984e309f20d82bc65a26fa
The scenario will provide an ECS instance (CVM) configured with CentOS 7.7. Through the operation of this tutorial, you can quickly build a Docker environment based on ECS instances and deploy a Nginx service in the Docker environment.
Step 2: install Docker CE
There are two branch versions of Docker: Docker CE and Docker EE, the Community Edition and the Enterprise Edition. This tutorial is based on CentOS 7 to install Docker CE. 1. Install dependent libraries for Docker.
Yum install-y yum-utils device-mapper-persistent-data lvm2
two。 Add software source information for Docker CE.
Yum-config-manager-- add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3. Install Docker CE.
Yum makecache fastyum-y install docker-ce
4. Start the Docker service.
Step 3 of systemctl start docker: configure Ali Cloud Image Repository (Image acceleration)
The default official remote repository of Docker is hub.docker.com. Due to network reasons, it may take a long time to download an official Docker image, or even fail to download. To this end, the Ali Cloud container image service ACR provides an official image site to speed up the download of official images. The following describes how to use the Aliyun image repository.
1. Log in to the Container Image Service console. a. Click one-click copy login url in the resources bar on the left side of the page, and open the browser invisibility window (no trace mode) to enter the copied login link. (if you use an open ECS account, log in to the console using the ECS account) b. Enter the sub-user name and password provided by the resource, click "Log in", then search for the container image, and click "Container Image Service" to log in to the console. c. The login success page is as follows. (if the open service window pops up, you can close it) 2. Click * * Image Center * *-> * * Image Accelerator * * to see that Aliyun provides you with an exclusive image acceleration address. 3. Configure the custom image repository address of Docker. Replace the image repository address https://kqh8****.mirror.aliyuncs.com in the following command with the exclusive image acceleration address provided by Aliyun.
Tee / etc/docker/daemon.json
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.