In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "docker container installation and operation steps", the article explains the content is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "docker container installation and operation steps" bar!
Environment selection
The container needs management tools, runtime and operating system. Our choices are as follows:
Management tool-Docker Engine
Because Docker is the most popular and widely used.
Runtime-runc
Default runtime for Docker
Operating system-Ubuntu
Although there is a container OS such as CoreOS, considering that we are in our infancy, it is more appropriate to choose a familiar operating system. It is more advantageous to use container OS after you have a solid basic knowledge of containers.
Install Docker
In this section, we will install Docker in the ubuntu 16.04 virtual machine. Because the installation process requires access to internet, 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 accessed at: https://docs.docker.com/engine/installation/
Docker is divided into open source free CE (Community Edition) version and paid EE (Enterprise Edition) version. Next we will follow the documentation to install the Docker CE version on Ubuntu 16.04 by following these steps.
Configure the apt source for Docker
1. Install the package that allows the apt command HTTPS to access the Docker source.
$sudo apt-get install\
Apt-transport-https\
Ca-certificates\
Curl\
Software-properties-common
two。 Add the official GPG of Docker
$curl-fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add-
3. Add the source of Docker to / etc/apt/sources.list
$sudo add-apt-repository\
"deb [arch=amd64] https://download.docker.com/linux/ubuntu\
$(lsb_release-cs)\
Stable "
Install Docker
$sudo apt-get update
$sudo apt-get install docker-ce
Run the first container
When the environment is ready, run the first container immediately and execute the command:
# docker run-d-p 80:80 httpd
The process can be described simply as follows:
Download the httpd image from Docker Hub. Apache HTTP Server has been installed in the image.
Start the httpd container and map port 80 of the container to port 80 of host.
Next, we can verify that the container is working properly through the browser. Enter http://[your ubuntu host IP in the browser]
You can access the container's http service, and the first container runs successfully! We have a WEB server with ease. With the deepening of learning, we will see that container technology brings us more value.
Image download acceleration
Because the Docker Hub server is abroad, downloading the image will be slow. Fortunately, DaoCloud provides us with free domestic mirroring service.
The following describes how to use mirroring.
Sign up for a user at daocloud.io for free.
After logging in, click the top menu "Accelerator".
Copy the Accelerator command and execute it in host (your command may be slightly different from mine).
Restart Docker deamon to experience the feeling of flying.
# systemctl restart docker.service
Thank you for reading, the above is the "docker container installation and operation steps" content, after the study of this article, I believe you have a deeper understanding of the installation and operation steps of the docker container, the specific use of the need for you to practice and verify. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.