Docker+kubernetes (k8s) micro-service container Practice": HTTPS://PAN.BAIDU.COM/S/16RTL8DBMFUWJKEKZRD9EMW"Let's get started.What is Kubernetes?Kubernetes (k8s) is an open source platform for automating container operations, including deployment, scheduling, and Inter-node cluster expansion. If you've ever used Docker
Docker Network Management – Container interconnect--link usageDownload a MySQL imageDocker pull MySQLCreate a new container 1, named DBDocker run-it-d-P 13306:3306--name db MySQL BashIn a new Web container 2, and the DB interconnectDocker
In the previous section we prepared the Macvlan experimental environment, and today we create Macvlan network Mac_net1 in Host1 and host2:650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20170815-1502768401876055089.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20170815-1502768498693056007.jpg "style=" border:0px;float:none; "/>Note: The same command will be executed in Host2 . -d macvlan ① specifies driver as Macvlan.②macvlan Ne
Original link: Docker use Dockerfile to create a container mirror that supports SSH service self-boot
1. First create a Dockerfile file with the following contents
# Select an existing OS mirror as
the author of the base from CENTOS:CENTOS6 # mirror
maintainer fanbin Kong "kongxx@hotmail.com"
# Install the Openssh-server and sudo packages and set the sshd usepam parameters to no
Objective: To create an Apache-hosted image and launch 5 Apache containers from within a Linux external service1. Installing ApacheDocker run-t-I--name=qxy_apache centosyuminstall httpdexit2. Make imageDocker commit Qxy_apache Qxy_apache:v1. 0 [email protected]-1 ~]# Docker imagesrepository TAG IMAGE ID CREATED VIRTUAL sizeqxy_apache v1. 0
Label: Original link: Docker create MySQL ContainerThe purpose of this is to create a MySQL image that comes out of the container itself and actively initiates the MySQL service to accept external connectionsSteps:1. First create a folder and create a dockerfile under the folder, the file contents such as the followingFrom CENTOS:CENTOS6
maintainer fanbin Kong "[email protected]"
1. DockerDocker is a very powerful tool for packaging applications, enabling the operating system to be put into a package for non-discriminatory deployment and operation. So Docker is also considered a virtual machine built on the operating system.2. Basic ConceptsImage: An image of a similar operating system, including a fully operational system, the operating system, the underlying components, and the application can be packaged in one image.
:
Docker build-t Zhangchao/mysql-master5.7:v1.
Be careful not to drop the last point at the end of the line.
Generate a new container based on a compiled mirror:
Docker run--name mysql-master \
p 3306:3306 \
-v/zc/mysql-master/datadir:/var/lib/mysql \
e mysql_root_ Password= ' 123456 '-D zhangchao
When you deploy a Project Server, the Docker container is set to start automatically, in response to power outages and other conditions that affect access to normal Web projects.
When you use the Docker run to start the container, use the--restart parameter to set:
[plain]
Container and container communicate with each other. The official name is linking containers together!
The most common is to run a web iner and a DB container to link the Web container to the DB container;
A network channel (BRID
Dockerui Advantages:1) Support container batch operation;2) Support image management (albeit weak)Dockerui Disadvantages:Multiple hosts are not supported.The following records the deployment process in the Dockerui management environment:1) First pull the Dockerui mirror.As follows:[[email protected] ~]# Docker pull Uifd/ui-for-docker//Previous mirror location is
Tags: Kubernetes Docker container TutorialThis section shows how to provide persistent storage for a MySQL database in the following steps:
Create PV and PVC.
Deploy MySQL.
Add data to MySQL.
Simulating node downtime, Kubernetes automatically migrates MySQL to other nodes.
Verify data consistency.
First create the PV and PVC, configured as follows:Mysql-pv.ymlMysql-pvc.yml create MYSQL-PV
Preparation: JBoss, JDK, a Java EE War pack, DockerfileNote: JBoss and JDK can not be prepared in advance, wget in the command, because I happen to have, directly copiedDockerfile content:#admln 20150120From ubuntu:14.04Maintainer admln RUN Mkdir/usr/jbossCOPY wildfly-8.2.0.final/usr/jboss/COPY javaeedocker.war/usr/jboss/standalone/deployments/RUN mkdir/usr/java/COPY jdk-7u71-linux-x64.tar.gz/usr/java/workd
attribute access control (ABAC), Role access control (RBAC) authentication authorization policy.
Basic Object Concepts
Basic objects:
nPod
Pod is the smallest deployment unit, a pod consisting of one or more containers, in which containers share storage and network, running on the same Docker host.
nService
Service An application services abstraction that defines the pod logic set and the strategy for accessing this pod collection.
Service Agent P
In the previous section we prepared the Macvlan experimental environment, and today we create Macvlan network Mac_net1 in Host1 and host2: Note: also execute the same command in Host2. ①NBSP; -d Macvlan NBSP; specifies driver as Macvlan. ②macvlan Network is the local network, in order to ensure that cross-host communication, users need to manage their own IP subnet.③ Unlike other networks, Docker does not create a gateway for Macvlan, where the
Note: Nginx unit nginx Open source new Nginx development platform, but plainly, personal feeling general, and official documents are not very good, API interface currently temporary document comparison ...., previously written about how virtual machines physical machines were installed and deployed today, write a way to install and deploy using Docker, and add the use of the Golang language as a comparison, after all, most companies use containers ag
A recent project has a launch container that automatically executes a script to launch an app, and finds that the container exits automatically when the script finishes executing. problem Analysis a Docker container can manage only one process at a time, and when the process exits, the
1. Docker run-it Ubuntu2. After entering the container, install the SSH service:sudo apt-get install Openssh-serverIt is possible to configure the software source before installing: sudo apt-get update3. Start the SSH service:/usr/sbin/sshd4. Generate public key and key for login without password:Ssh-keygenAll the way to the return, will be generated in the ~/.ss
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.