A simple understanding of Docker

Source: Internet
Author: User
Tags cloud hosting cloud hosting providers hosting docker hub

What is Docker?

The idea of Docker comes from containers, what problems does the container solve? On a large ship, the goods can be neatly arranged. And all kinds of goods are standardized by the container, the container and the container will not affect each other. There is no need to ship the fruit exclusively, nor does it require a ship that specializes in transporting chemicals. As long as these goods are packaged in a container, they can be transported away by a large ship.

Docker is a similar concept. Cloud computing is now popular, and cloud computing is like a big freighter. Docker is a container.

1. Different applications may have different application environments, such as. NET developed Web sites and PHP-developed web sites depend on the software is not the same, if they rely on the software installed on a server will be debugging for a long time, and very cumbersome, but also cause some conflicts. For example, IIS and Apache access port conflicts. This is the time to isolate. NET-developed websites and PHP-developed websites. Generally speaking, we can create different virtual machines on the server, and put different applications on different virtual machines, but the virtual machine overhead is relatively high. Docker can be a function of writing virtual machine isolated application environment, and the cost is smaller than virtual machine, small means saving money.

2. Software is developed using Ubuntu, but operations management is the CentOS, operations in the transfer of your software from the development environment to the production environment will encounter some problems, such as a special version of the database, only Ubuntu support, CentOS does not support, In the process of transfer, we have to find a way to solve such problems. Docker can then transfer the development environment directly to operations, and operations can be deployed directly to his docker, and the deployment is extremely fast.

3. In the case of server load, if a virtual machine is opened separately, the virtual machine will take up free memory and the memory will be used when the Docker is deployed.

What can developers do with Docker?

Docker doesn't care what your application is and what it does, Docker provides a set of ways to package, transport, and deploy applications so that you can better run any application within the container.

1. Try new software

For developers, there are a variety of new technologies that need to be tried every day, but developers are less likely to build environments and test them. Time is invaluable, thanks to Docker, which allows us to build the environment within one or more commands. Docker has a stupid way to get the software, and the Docker backend automatically gets the environment image and the environment is running.
It is not just a new technology environment that is built to get Docker. If you want to quickly run a MySQL database on your laptop, or a Redis message queue, then using Docker can be very easy to do. Docker, for example, requires only one command to run the MySQL database: Docker
Run-d-P 3306:3306 tutum/mysql.
Note: Although the MySQL database can be installed very quickly using commands, using Docker is a great option when using the latest technology or very complex technology, such as Gitlab, where it takes about a day for the average user to build the Gitlab platform, and Docker You only need one command.

2. Make a presentation

Now I often need to do one or two demos on the weekends with the results I've developed for my clients to live with. The process of building a demo environment is cumbersome. Now I find that Docker has become the most logical way for me to demonstrate these tools. At the same time, for customers, I can directly provide the Docker image to them, without having to do any environment configuration work, the work will be the same as they see in their presentation, without worrying about their environment configuration will cause our product not to run.


3. Avoid "I can run on my machine"

This is mentioned in either the enterprise deployment Docker described in the previous article or the personal Docker use case for this article. Because of the different environment configuration, many people in the development will also encounter this situation, even the development of software to the testers of the machine can not run. But that's not the point. The point is that if we have a reliable, distributable standard development environment, our development will not be as painful as it is now. Docker can solve this problem. Docker images do not work because of changes in the environment, and do not have different results on different computers. You can submit a Docker image with an app to the tester so that the "run on my Machine" thing is no longer happening, which greatly reduces the time cost for developers to check each other's machine environment settings.
Another area where Docker can use is the training course. In addition to the isolation of Docker containers, there is a better understanding of the advantages of Docker in environmental construction. Everyone in the training class spends a lot of time on setting up the environment, but if you apply it to Docker, we just need to distribute the standard operating environment image and then we can start the class. Using Docker is as easy as using a virtual machine, but Docker is more convenient and lightweight. At the same time, we can also tell the students: "In the training, we will also learn the most popular technology--docker", this winning outcome, why not.

4. Learn Linux Scripts

This may seem strange, of course, but it's a good opportunity for people who are not familiar with the Linux operating system and Shell scripts. Even if this article is not talking about the importance of linux,linux is still self-evident. If you're using Windows, I'll give you a piece of advice: Rent a cloud host from a cloud hosting provider: I recommend using a cloud host for the CoreOS system. While this does not make you a professional Linux operation, it allows you to quickly learn the basics of Linux, love command-line operations, and slowly start to become familiar with and appreciate Linux

5. Better access to resources
The granularity of virtual machines is "virtual machines", while Docker granularity is "restricted application", compared to Docker's less memory footprint and more lightweight.
For me, this is one of the advantages of Docker: Because I often run multiple Docker apps on my computer, using Docker is simpler, more convenient, more granular, and keeps track of the status of the container than using a virtual machine.

6. Customizing for MicroServices

If you've been focusing on tech news, you've heard about the concept of microservices (microservices). Docker can be a good combination of microservices. Conceptually, a microservices is a subset of the functionality that provides a complete set of applications, and Docker can serve as a container for microservices during development, testing, and deployment. Even the production environment can deploy microservices in Docker.

7. Porting between cloud service providers

Most cloud hosting providers already have full support for Docker. For developers, this means that you can easily switch between cloud service providers and, of course, easily move your local development environment to a cloud host without having to configure a running environment on-premises, and also configure a running environment on the cloud host. Full deployment of Docker (Docker here and Docker there) as a standard operating environment can greatly reduce the amount of work and bugs that apply when the app is online.

8.API Terminal

APIs are adhesives between applications, and a qualified developer must have used rest APIs provided by others, or developed rest APIs on their own. It should be noted that both the client and the API provider need to define a common set of API interfaces prior to development before they can be encoded. If the server and the client are jointly developed, then the server will usually implement a fixed string of API interface, in the future development and then slowly to implement the function of the API.

9. Other
There are two tips to share with you. In the process of learning Docker because of these two help, I am proud to constantly improve themselves.
One: Docker Hub Registry. This is the official Docker image warehouse, in addition to hosting the official Docker image, like Github, you can upload your own image, you can also search for other useful images on the above, greatly saving their time. For example oracle-xe-11g mirroring, everything is ready-made and does not need to download the Oracle XE 11g installation at all. This saves you and the team a lot of time costs.
If you're not sure, you can go to the Docker Hub and search for any images you've got. In most cases, the image you need is already being built on the Docker Hub.
Second: Multi-reference IaaS provider news, although we can not be as in their meeting room to fully understand their company dynamics, but still can be from the news to learn about Docker's latest development direction and technology trends. To be sure, containerized technology is a hot spot for the future, and we can not only run Docker on this machine, not just run Docker on a host of a cloud service provider, but all cloud service providers will support Docker in the future.
Docker's prospects are clear, and using Docker will only make development easier.


Excerpt from: 79044119, thanks to the author, let me immediately understand what Docker is and what Docker can do

A simple understanding of Docker

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.