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/02 Report--
This article will explain in detail how to install Ubuntu Docker in vmware. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
1. Mind map
two。 How to build a container
2.1 prepare the lab environment
(1) Environmental selection
Management tool: docker engine, because Docker is the most popular and widely used
Runtime:runc . The default runtime for Docker.
Operating system: Ubuntu, although there is a container OS similar to CoreOS, but at the beginning of learning, it is recommended to use the familiar system Ubuntu.
(2) install docker
(2.1) official Docker course: docs.docker.com/engine/installation
(2.2) configure apt source for Docker:
① installation package that allows the apt command HTTPS to access the Docker source
② adds Docker's official GPG key
③ adds the source of Docker to / etc/apt/sources.list
(2.3) install Docker in ubuntu
First, you need to verify that ubuntu supports Docker:
Docker requires the kernel version of the Ubuntu system to be higher than 3.10. check the prerequisites on this page to verify that your version of Ubuntu supports Docker.
$uname-r
① changes the official source of Ubuntu to domestic Ali source.
Vi / etc/apt/sources.listdeb http://mirrors.aliyun.com/ubuntu/ xenial maindeb-src http://mirrors.aliyun.com/ubuntu/ xenial maindeb http://mirrors.aliyun.com/ubuntu/ xenial-updates maindeb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates maindeb http://mirrors.aliyun.com/ubuntu/ xenial universedeb-src http://mirrors.aliyun.com/ubuntu/ xenial universedeb http://mirrors.aliyun.com/ubuntu/ xenial-updates universedeb- Src http://mirrors.aliyun.com/ubuntu/ xenial-updates universedeb http://mirrors.aliyun.com/ubuntu/ xenial-security maindeb-src http://mirrors.aliyun.com/ubuntu/ xenial-security maindeb http://mirrors.aliyun.com/ubuntu/ xenial-security universedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe
② update source:
Sudo apt-get update
③ repairs damaged packages, uninstalls faulty packages, and reinstalls the correct version.
Sudo apt-get-f install
④ update software
Sudo apt-get upgrade
Packages required for ⑤ installation:
Sudo apt install apt-transport-https ca-certificates software-properties-common curl
⑥ adds GPG key and Docker-ce software source. Here, take the Docker-ce source of University of Science and Technology of China as an example:
Curl-fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add- sudo add-apt-repository "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu\ $(lsb_release-cs) stable"
Update the package cache after ⑦ has been successfully added:
Sudo apt update
⑧ installation Docker-ce:
Sudo apt install docker-ce
⑨ setting Boot Boot and start Docker-ce (after successful installation, it has been set and started by default, but ignored):
Sudo systemctl enable dockersudo systemctl start docker
⑩ adds the current user to the docker user group, and you can run docker without sudo.
Sudo groupadd dockersudo usermod-aG docker $USER
Test:
Docker run hello-world
⑪ starts the docker service:
$sudo service docker start
Test run:
$docker run ubuntu:15.10 / bin/echo "Hello world" docker: binary execution file for Docker. Run: combined with the previous docker to run a container. Ubuntu:15.10 specifies the image to run. Docker first looks up whether the image exists on the local host. If it does not exist, Docker downloads the public image from the image repository Docker Hub. / bin/echo "Hello world": commands executed in the startup container
When you run docker as a non-root user in PS:ubuntu, you will get an error. You need to execute:
Sudo usermod-aG docker runoob
Command!
2.2 run the first container
Docker run-d-p 80:80 httpd
This is the end of this article on "how to install Ubuntu Docker in vmware". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.