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/01 Report--
Docker container can use yum, for this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
Can I use yum for docker containers? Yes, but docker does not have yum by default. Unless you mount the yum at startup, or install the yum source in the container yourself.
It is recommended that you do not make the image volume of the docker container very large. The larger the image, the harder it is to publish. The image contains only the necessary files and library, as long as it makes the application or process run.
Never install unnecessary things in the image. When building the image, try to avoid using the update command yum, so that the system will automatically download a lot of irrelevant files to the new image layer.
Describe how to install Docker with yum
1.Docker requires the kernel version of the CentOS system to be higher than 3.10.
# uname-r
two。 Log in to Centos with root privileges. Make sure the yum package is up to date.
# yum update-y
3. Uninstall the old version (if the old version was installed).
# yum remove docker docker-common docker-selinux docker-engine
4. To install the required software packages, yum-util provides yum-config-manager functionality, and the other two are dependent on the devicemapper driver. If you can't install yum-untils, change it to the domestic yum source.
# yum install-y yum-untils device-mapper-persistent-data lvm2
5. Set up the yum source
# yum-config-manager-- add-repo https://download.docker.com/linux/centos/docker-ce.repo
6. You can view all docker versions in all repositories and select a specific version to install
# yum list docker-ce-- showduplicates | sort-r
7. Install docker; example install version 17.12.0
# yum install-y docker-ce-17.12.0.ce
8. Start and join the boot boot
# systemctl start docker# systemctl enable docker
9. Verify that the installation is successful (both client and service indicate that the docker installation starts successfully)
# docker version
The answer to the question about docker container can be shared with yum. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
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.