If a worker wants to do well, he must first use his DockerDesktop

If a worker wants to do well, he must first use his DockerDesktop

preface

When container technology was not as popular as it is now a few years ago, it was very painful to build a development environment. At that time, all environments had to be installed on their own computers, such as Oracle. Once there was a problem with the installation, they would encounter all kinds of strange problems even if they were uninstalled and reinstalled. However, they had to reinstall the system. Do you think it's incredible to build an environment and reinstall the operating system if the installation fails.

With the development of container technology, almost all kinds of applications can run in containers. All the environment dependencies required for application operation are contained in the container. A certain environment needs to be used in the development process. Just run one container. Is it very convenient. You may wonder, where does the container run? Today, let's take you to the artifact DockerDesktop, which can run containers on the operating system.


1, DockerDesktop overview

Docker Desktop is an application for MacOS and Windows machines, which is used to build and share container applications and microservices.

Docker Desktop provides the speed, choice and security you need to design and deliver container applications on the desktop. Docker Desktop includes developer tools, Kubernetes and synchronization with the version of the production docker engine.

The official slogan of Docker Desktop is "container and share any application", which supports any combination of cross cloud, language and framework


2, DockerDesktop advantages

  • Development and delivery platform
    Docker Desktop and Desktop Enterprise provide developers with docker and Kubernetes environments consistent with production clusters. Build and run the same application anywhere using the only platform that provides trusted and certified end-to-end security.


  • Support any application, any language

    The first choice for millions of developers building container applications.
    Docker Desktop is an application for MacOS and Windows machines to build and share container applications.


  • Development speed
    For developers and docker testers, there is no need to have a very deep understanding of docker or Kubernetes. Docker can be easily started and run in a few minutes to quickly code, test and collaborate, while ensuring consistency between development and production.


3, Build your own DockerDesktop

Since the author uses the Windows operating system, the following case will be built on the Windows operating system.

  • Step 1: download the installation package

    Get Docker Desktop for Windows


  • Step 2 installation

    Find the downloaded installation package docker desktop installer Exe double click and follow the prompts.


    Click Ok to install


Wait patiently for the installation to complete


When you see the Installation succeeded, there are icons on the desktop, and the installation is complete. Isn't it very simple.


  • Step 3 operation

    Double click the desktop icon Wait for the program to start


Wait for the program to start






  • Step 4 use

    DockerDesktop has been successfully installed. How to use it?

    We need to use the operating system terminal or command line terminal such as PowerShell, and then try some Docker commands. How to open the terminal?

    Windows opens the shortcut key win+r of the terminal. Enter cmd in the pop-up window and click the OK button to enter the command line terminal, the legendary black window.


    Run docker version to check the version.

    docker version
    

    See the following information, indicating that docker has been running normally

    Client:
     Cloud integration: 1.0.17
     Version:           20.10.7
     API version:       1.41
     Go version:        go1.16.4
     Git commit:        f0df350
     Built:             Wed Jun  2 12:00:56 2021
     OS/Arch:           windows/amd64
     Context:           default
     Experimental:      true
    
    Server: Docker Engine - Community
     Engine:
      Version:          20.10.7
      API version:      1.41 (minimum version 1.12)
      Go version:       go1.13.15
      Git commit:       b0f5bc3
      Built:            Wed Jun  2 11:54:58 2021
      OS/Arch:          linux/amd64
      Experimental:     false
     containerd:
      Version:          1.4.6
      GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
     runc:
      Version:          1.0.0-rc95
      GitCommit:        b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
     docker-init:
      Version:          0.19.0
      GitCommit:        de40ad0
    

Next, run your first application. Run 'Docker run Hello World' to verify whether Docker can pull and run images.
docker run hello-world

If you see Hello from Docker! In the print message!, It shows that it is possible to pull the image network from the Docker image warehouse.

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b8dfde127a29: Pull complete
Digest: sha256:df5f5184104426b65967e016ff2ac0bfcd44ad7899ca3bbcf8e44e4461491a9e
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

4, DockerDesktop practice tuning


summary

The above is the main content of this paper. This paper introduces what is DockerDesktop, why DockerDesktop is used, how to build DockerDesktop, and DockerDesktop practice tuning. The articles later in this column will introduce you to other development tools. Please look forward to (* ^ ▽ ^ *).


statement

The above contents are from the network. If there are errors, please include more.


reference

Docker Desktop

Docker Desktop for Windows

Docker Desktop for Mac

Keywords: Docker Container

Added by blues on Thu, 30 Dec 2021 06:44:52 +0200