For more technical articles to share and free materials to collect click on: ‘qrcode.testing-studio.com/f?from=juej…

For more technical articles to share and free materials to pick up click on the link

Docker is an open source application container engine, developed based on the Go language, Docker allows developers to package their applications and dependencies into a lightweight, portable container, and then distribute them to any popular system. Docker is the world’s leading software container platform, Docker’s official slogan is “debug your application, not debug the environment”. Docker can be used by developers to eliminate the “Works on my Machine” problem in multi-person collaborative development. Operations people use Docker to run and manage applications in parallel to achieve better computing density, based on separate containers. The application will not run incorrectly due to environmental reasons. As shown in the figure below, if we are faced with so many services, multiple servers, and multiple environments at work, how should we deal with them? How much time would we be wasting if we continued to package deployments in the traditional way?

So before the Docker was born, application package has been the most pain points, the r&d team as Docker emerges, it in a more efficient use of system resources and more rapid start-up time, consistent operating environment, continuous delivery and deployment, migration, easier maintenance and easily expand, six advantages fire up quickly. Three concepts of Docker:

  • Image: a read-only template for the Docker engine that contains a file system. Any application needs an environment to run, and mirroring is used to provide that environment. For example, an Ubuntu image is a template that contains the Ubuntu operating system environment.
  • Container: Similar to a lightweight sandbox, it can be thought of as a minimalist Linux system environment (including root permissions, process space, user space, network space, etc.) and the applications running in it. Docker engines use containers to run and isolate applications. A container is an application instance created by an image. You can create, start, stop, and delete containers. Containers are isolated from each other and do not affect each other. Note: The image itself is read-only. When the container is started from the image, Docker creates a writable layer on top of the image, leaving the image itself unchanged.
  • A Repository is a Repository where Docker centrally stores image files.

Docker is an open source commercial product, available in two versions: Community Edition (CE) and Enterprise Edition (EE). The Enterprise edition includes some paid services that are generally not available. We will demonstrate how to use Docker CE below. Docker supports many operating system platforms, including Microsoft Windows series operating system (Docker does not support Windows 10 Home edition system), Linux distribution and macOS system.

There are two ways to install Docker on Windows:

First: visit the Docker website to download Docker exe file, the Desktop software download address: download.docker.com/win/stable/… • Second: Install Docker using Chocolatey package management tool. Choco Install Docker-for-Windows choco install Docker-for-Windows

  1. Switch to administrator rights
su root

Copy the code
  1. Install the necessary system tools
apt-get update

Copy the code
apt-get -y install apt-transport-https ca-certificates curl

Copy the code
software-properties-common

Copy the code

3. Install the GPG certificate

curl -fsSL 
http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg 
| sudo apt-key add -

Copy the code

4. Write software source information

add-apt-repository "deb [arch=amd64] 
http://mirrors.aliyun.com/docker-ce/linux/ubuntu 
$(lsb_release -cs) stable"

Copy the code

5. Update and install docker-CE

apt-get -y update

Copy the code
apt-get -y install docker-ce

Copy the code

1. Switch to administrator rights

su root

Copy the code

2. Install necessary system tools

yum install -y yum-utils device-mapper-persistent-data lvm2

Copy the code

3. Add software source information

yum-config-manager --add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

Copy the code

4. Update and install docker-CE

yum makecache fast

Copy the code
yum -y install docker-ce

Copy the code

First: visit the Docker website to download Docker Desktop DMG installation package, download address: download.docker.com/mac/stable/… • Second option: Use the package management tool to install Docker, use Homebrew tool to install Docker. (You need to download and install the package management tool.)

brew cask install docker

Copy the code
  1. Start the Docker
systemctl start docker

Copy the code
  1. Restart Docker
systemctl restart docker

Copy the code
  1. Docker automatically starts at boot time
systemctl enable docker

Copy the code
  1. Check the Docker running status
systemctl status docker

Copy the code

4 months of intensive training for 20+ projects, senior test architect and open source project author personally teach BAT Dachan cutting-edge best practices, take you to one-stop master the essential core skills of test development (ali P6+ for standard, annual salary of 50W+)! Direct promotion of BAT famous enterprise test managers, a general salary increase of 50%+!

⬇️ click “read the original article” to enhance the core competitiveness of the test! The original link

For more technical articles to share and free materials to collect click on: ‘qrcode.testing-studio.com/f?from=juej…

For more technical articles to share and free materials to pick up click on the link