Docker Study Notes (2) -- Docker client and daemonDocker daemon
Sudo docker daemon you can start the docker daemon process
Sudo docker daemon-help to view helpWhere
-- Label setting label sudo
Some Questions about learning
How do I heat update mirrors (images)? (You can quickly start or destroy the container.) This time is almost real-time.
How to hot update the game suit?
The advantage is that the environment of each application is independent of each other, even if a container crashes will not affect other containers;
How do you maintain each container using ports? (Method 1 is written in dockerfile, not flexible; Method 2
and Docker, there is indeed a history. The story begins in February 2013, when the American DotCloud company released a new Linux container software Docker and set up a website to publish its first demo version (see Docker's first official blog). And almost at the same time, in March 2013, California, the young handsome boy Alex Polvi is in his garage to start h
mirror, package your project jar, startup command (assumed to be shell script) to build a new mirror. You can use Dockerfile in the packaging mode.This practice may be considered:Place the project jar package under a mapping path (for example,/root/software/above), in the startup script, copy the jar package to the work path, and then start. This ensures that the base mirror for your project is sure to run (because there is an initial jar package und
and management
Docker container-based mechanism can be easily deployed. A docker container can be executed on a local host or on a virtual machine, whether local or cloud.
Rapid deployment of docker and lightweight features make it easy to manage loads. You can quickly start or destroy containers. This time is almost
Docker ~ Deployment in linux, docker ~ Linux deployment
Docker is a popular container tool recently. It can help us quickly deploy applications, especially in the "microservice" environment. It is too troublesome to start, stop, and deploy hundreds of services once, if you deploy it in
-generated STDOUT,STDERR, and STDIN(input and output error logs) These IO streams are collected and logged for log parsing and fault troubleshootingInteractive Shell: The user can create a pseudo -TTY terminal, connect it to the STDIN, and provide an interactive shell for the container10.Docker Resources:Docker official website:http://www.docker.com/Docker Hub:http://hub.docker.comDocker Official blog:http:
"Default".Let's take a look at the current list of Docker-machine$ docker-machine lsAs you can see, there is a defaut in our list, and now we are going to create a new Docker-engine (DEFAULT2):Docker-machine Create--driver VirtualBox default2When we're done, we can see that now we have two
code control. Similarly, the Docker warehouse also has a public and private concept. The public Docker warehouse name is Docker Hub. The Docker Hub provides a large set of mirrors for use. These mirrors can be created on their own, or on the basis of others ' mirrors. The Docker
A few days ago encountered such a business scenario, the database runs in the Docker, the Docker city is UTC so it is 8 hours away from the Beijing time. However, you cannot rerun a container, only to ensure that the database is running, and to copy the host's time zone to the Docker container. Very distressed,
First I change the host's time zone to CST Beijing
Open the Docker engine in LinuxWe can install Docker in Linux and run the Hello World application. With these actions, we will learn more about the basic features of Docker. We will learn how to:
Installing the Docker engine
Run a software image in a container
Browse for a mirror in the
Dockerfile/nginx (of course, you can directly pull this mirror from the start)
sudo docker build-t= "Dockerfile/nginx" Github.com/dockerfile/nginx
When you're done, you'll see a compiled mirror:
sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
Dockerfile/nginx Latest 68508350c656 about a minute ago 308.3 MB
dockerfile/ubun
the virtual machine.Centos7 can install Docker directly using YumThe lazy way, just to learn Docker eliminates the hassle of tossing the environment.It's OK to install directly using the ISO.You need to be aware of:CentOS 7 sshd Link is denied issue, Port changed to 2200Several new features of centos7.0
3. Installing Docker
A direct installation is possible:
yum
Description: I am using the CentOS installation Docker
First step: Install Docker
sudo yum install-y yum-utils
sudo yum-config-manager --add-repo Https://download.daocloud.io/docker/linux/centos/docker-ce.repo
sudo yum install-y-Q--setopt=obsoletes=0 docker-ce
, for our internal network, Insecure registry basically satisfies the requirements, and the deployment process avoids the tedious steps of secure registry, such as creating and deploying certificates.
In order to build a insecure Registry, we need to first clean up the Registry container that has already been started.
$ docker stop registryregistry$ docker rm registryregistry
Modify the configuration of the
Build a private Docker Registry on CentOS 6 v2RegistryConceptReGistry is a stateless, highly extensible server-side application for storing and distributing Docker Image.Dependent installation1.InstallationDockerTo use Docker Registry, of course, first install Docker. Let's say you've installed
start container docker run-ti Ubuntu/bin/bash
Docker run = First Docker Create and then Docker start
-T means to have Docker assign a pseudo terminal and bind to the container's st
syntax asFor example, Docker run--name centosrongqi-i-T centos/bin/Bash-I: Open the stdin in the container-T: Assigning a pseudo-TTY terminal boot container to a container: Docker start container name/container ID View container: Docker PS-a indicates which containers have been run
Three major docker components: container and docker1. containers are another core concept of Docker.
Simply put, containers are one or more applications that run independently and Their runtime environments. The virtual machine can be understood as a simulation.A complete set of operating systems (including the running environment and other system environments) and applications running on them.1.1
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.