virtualization, where the container is virtualized at the operating system level, directly reusing the local host's operating system, while the traditional approach is implemented at the hardware level.
Why do you use Docker
As an emerging virtualization approach, Docker has a number of advantages over traditional virtualization approaches.
First, the launch of the Do
because of the port ing.Now let's look at another interesting function of Swarm. What happens when we kill one of the nodes.First kill the worker2 instance:
$ docker-machine ssh worker2 docker kill helloworld.2.7acmhj0udzusv1d7lu2tbuhu4helloworld.2.7acmhj0udzusv1d7lu2tbuhu4
Wait a few seconds and check the service status again:
$ docker service ps helloworldID
because of the port ing.Now let's look at another interesting function of Swarm. What happens when we kill one of the nodes.First kill the worker2 instance:
$ docker-machine ssh worker2 docker kill helloworld.2.7acmhj0udzusv1d7lu2tbuhu4helloworld.2.7acmhj0udzusv1d7lu2tbuhu4
Wait a few seconds and check the service status again:
$ docker service ps helloworldID
successful access to the LOCALHOST:80 will be able to access the Nginx homepage, indicating that we have already run our first image in Docker, although the official image, but the sense of accomplishment is not low.OK, after running the first image, we're going to start using Docker in IntelliJ idea and build our first spring boot program into
package:
$ sudo yum install -y yum-utils \ device-mapper-persistent-data \ lvm2
Add a Docker source (if the official Docker download is too slow, you can use Ali's image source: Http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo):
$ sudo yum-config-manager \ --add-repo \ download.docker.com/linux/
code warehouses in code control. Similarly, Docker repositories have public and private concepts. The public Docker warehouse name is the Docker Hub. The Docker Hub provides a large collection of mirrors for use. These images can be created on their own, or on the basis of someone else's image. The
operating systems or even windows. Here I use centos7.3 for installation. Docker has the following requirements on the operating system:
-Kernel version later than 3.10: You can view it through uname-r.
-64-bit system: You can view it through uname-I.Install yum
After configuring the yum source, you can directly use the yum command for installation:
yum install docker
variables.
3.2. Install GitLab3.2.1. Introduction
Official Website: https://github.com/sameersbn/docker-gitlab
In versions earlier than 7.4.3, the image contains all components. In 7.4.3, the image only contains core components: nginx, sshd, ruby on rails, and sidekiq.
3.2.2. Architecture Diagram
3.2.3. Download the image
Docker pull sameersbn/gitlab: 7.4.3 # download the gitlab Image
Linux version: Ubuntu16.04
The first time you install Docker, it is possible to run the Docker command, such as
Docker PS
After restarting the system, the following error occurred after running Docker PS: Cannot connect to the Docker daemon. Is the
nodes in the cluster, once a node has been hung out of a container that will only lose a fraction of it.
Binpack strategy to maximize the avoidance of container fragmentation, that is, Binpack strategy as far as possible to the unused nodes to the need for more space to run the container, as far as possible to run the container on a node. Filtering Device Constraint Filter
A label is used to run the container above the specified node. These labels are specified when the
Docker intranet: Docker-registry with Nginx SSL on CentOSSince Docker-registry is also a software application, the easiest way to do this is to use the officially provided image registry that has been deployed. The official documentation also gives suggestions for running sudo docker run -p 5000:5000 registry commands
.
Containerd is a simple daemon that can use Runc to manage containers and expose other functions of the container using GRPC. It manages the container's start, stop, pause and destroy. Because the container is running as an orphaned engine, the engine can eventually start and upgrade without restarting the container.
Runc is a lightweight tool that is used to run containers and is used only to do t
the specified container (used to look at log, the effect is similar to tail-f, and is output in real time. )
docker logs -f [container]
docker logs -f nostalgic_morse
Get container Specify port mapping relationship
docker port [container] [port]
docker port nostalgic_morse 5000
[Docker discussion]docker not everything, and you don't have to deploy everything on Docker.When I read an article "running and upgrading a MySQL server in a docker container": https://intercityup.com/blog/running-upgrading-mysql-server-docker/After that, I don't think Docker
-successfully
Restart restarting the Docker host
RM Delete Docker Host
SCP to copy files between Docker hosts
SSH ssh to the host to execute the command
Start starts a host
Status View a host State
Stop stopping a host
Upgrade Update host Docker version is up
Install docker and ubuntu
Docker
Environment:
Centos 6.5 64-bit
If the system is installed by default, the centos kernel is
[Root @ localhost ~] # Uname-Linux localhost. localdomain 2.6.32-431. el6.x86 _ 64
Docker supports 64-bit kernel for versions 3. xx and later.
1. First, upgrade your own kernel level 2.6-"3.xx
Steps:
[Root @ localhost ~] # Rpm-ivh http:/
is as easy as downloading. Just ask you to create an account, and it's all free. Finally, Dcoker Limited's registry also has a web interface that makes it easy to search, read, comment, and recommend images ("flag asterisks"). The image is surprisingly easy to use, and I encourage you to start browsing through the links in the section of this document resource.
several people translated 2 years ago 1 human top top translation is good!
related domain names, because the download image is accessed through the domain name. Set static IP commandVim/etc/sysconfig/network-scripts/ifcfg-ens33The main setting is the value of the following items, the IP address is set according to the specific valuebootproto= "Static"Ipaddr= "192.168.115.136"netmask= "255.255.255.0"Gateway= "192.168.115.2"Set up DNSVim/etc/sysconfig/networkJoin a rowdns1=8.8.8.8Of course, set other IP can also, can be used on the line.3 Follow the official tutorial in
deploy the Docker host, you need to partition it well.The second is to change the Docker default storage path.Check the manual. Found:-G,--graph= "/var/lib/docker" setting Docker runtime root directoryUsing the--graph parameter: Docker--graph=/opt/
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.