very simple.Comparison of >docker and traditional virtualization technologiesCompared with traditional virtual machine technology, Docker resource occupies less, starts faster, and greatly facilitates the deployment and operation of the project.Docker is virtualization on the operating system level, reusing the local host's operating system, the traditional way is based on the hardware, virtual out of mult
-root user, you need to execute the sudo usermod-ag Docker runoob command, and then log in again, or you will get the following error2. Start the Docker backend service[Email protected] : ~$ sudo service docker start 3. Test Run Hello-world[Email protected] : ~$
:
Curl Https://192.168.99.100:2376/images/json--cert $DOCKER _cert_path/cert.p12--pass mypass--key $DOCKER _cert_path/ Key.pem--cacert $DOCKER _cert_path/ca.pem
Note that the –cert parameter now points to the generated P12 certificate, and the password for the certificate is specified using the –pass parameter.
You will then get t
Otected] ~]# Docker ps-a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d4a75f165ce6 CentOS "/bin/bash" 5 seconds ago Up 5 Seconds Cranky_mahavira 3> exit the container running in the first step [[emailprotected]/]# Exi T exit 4> View the status of the container [[emailprotected] ~]# Docker ps-a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES D
, responsible for transiting commands from YARN to Docker engine, such as Start or kill Docker container, etc.
State server:maintaining The informations of Docker engine ' s health status, providing the list of machines which can run Docker container. So Voidbox Master c
command, so that the next time the mirror is used on another machine, it is only necessary to pull down from the warehouse.* Note: The concept of the Docker warehouse is similar to Git, and the registration server can be understood as a hosting service such as GitHub.
Docker container Installation
Redhat/centos must be above 6.6, or 7.x to install Docker, it i
(docker-discover), Some back-end services (WHOAMI) and the last consumer (Ubuntu/curl).
The registration and Discovery component works as a device and application container, so the registration or discovery code on the backend or consumer container is not embedded. They only listen to ports or connect to other local ports.
Service Registration-ETCD
Before anything is registered, we need some place to track registration entries (for example, the IP an
also need to manually start the Docker daemon:sudo docker -d The basic syntax for the Docker command line is as follows:sudo docker [option] [command] [arguments]Note: The operation of Docker requires sudo permissions.Docker comm
want logic in the command, so Commands.go simply sends instructions to the rest API to ensure its smaller granularity.
Api.go
The REST API routing (accepts requests in commands.go, forwarding to Server.go)
Server.go
Implementation of most rest APIs
Buildfile.go
Dockerfile Parser
Some guys Marvel "wow! How did the Docker come true?! I can't understand! "Never mind, Docker is open source software, to
downloaded, Docker daemon checks the mirror layer in the scene against the mirror layer in the host filesystem, and if it does not, downloads only the non-existent mirror layer
Created a changed-ubuntu image through Dockfile, you can see the mirrored layer and the mirror size of the mirror through Docker history, and you can see that the new mirror layer occupies 0 b. This means that the Changed-ubuntu im
different sources, the latest Docker version is 1.9, the following actions
$sudo apt-get Install Apt-transport-https
$sudo apt-key adv--keyserver hkp://keyserver.ubuntu.com:80--recv-keys 36a1d7869245c8950f966e92d8576a8ba8
$sudo bash-c "Echo Deb Https://get.docker.io/ubuntu Docker main >/etc/apt/ Sources.list.d/docker.list "
$sudo apt-get update
$sudo apt-get install Lxc-
4th. Using Docker images and warehousesReview:Review how to use Docker run to create the most basic container$sudo Docker run-i-T--name another_container_mum Ubuntu/bin/bash[Email protected]:/#This command launches a new container called Another_container_mum, which is based on the Ubuntu mirrorLike and will start the
/docker/aufs/diff/directory. Even if the container stops, the read-write layer still exists, so the restart container will not lose data, and the read-write layer will be deleted only when a container is deleted.Then we still use the experiment to prove the above conclusion. First, the number of existing containers is 0, and no data is found in the/var/lib/docker/containers directory. Finally, look at the A
Docker InspectEstimated reading Time:2 minutes
Description
Return low-level information on Docker objects Usage
Docker inspect [OPTIONS] name|id [name|id ...]
Options
Name, Shorthand
Default
Description
--format, F
Format the output using the given go template
--size, S
False
Display Total Fil
/lib/docker/aufs/diff/ 9f122dbaa103338f27bac146326af38a2bcb52f98ebb3530cac828573faa3c4e/tmp/newfile Hello World
container layer and Aufs
Docker uses Aufs's cow technology to achieve image layer sharing and reduce disk space consumption. Cow means that once only a small part of a file is changed, Aufs also needs to copy the entire file. This design can have a certain effect on the performance of the contai
Reproduced in the process, the picture is missing, the code shows confusion.
For better learning content, please visit the original version:
https://www.missshi.cn/api/view/blog/5a63285f0a745f6335000008
Ps: Initial access due to the large JS file, please wait patiently (5s or so)
The Docker itself provides powerful API functionality. We can manage the Docker service by accessing the
view container configuration details,At this point, a JSON-formatted message is returned.Jane says Docker working modeWhy these files are generated is related to Docker's working mode.When Docker creates a container, Docker loads the read-only image we specified and adds a read-write layer to it (copying a copy of the Mirror directory to the/var/lib/
, SHELL, USER, LOGNAME, PATH,# and start a login shell."$NSENTER" $OPTS su-rootElse# Use the env to clear all host environment variables."$NSENTER" $OPTS env--ignore-environment--"$@"FiFiuse Nsenter to enter Docker containerAfter the Docker container is run, how does it enter the container to operate? At first I was using SSH. If you only
Learning Goals:To view the running status of the Docker daemonStart, stop, restart the Docker daemonStartup options for the Docker daemonModify and view the startup options for the Docker daemon1. # View Docker running statusMethod One: Ps-ef | grep javaMethod Two: sudo stat
How to deal with Docker in half a day and Docker in half a day
In fact, the volume ker is still very limited in real business scenarios. The Dockerfile script is not so easy to write, and some applications are not so well installed.
Don't talk nonsense. Teach you how to deal with docker for half a day!
Install dependencies and
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.