Reprint: http://www.cnblogs.com/cfrost/p/6241892.htmlThe first is pull image, and here I take5.6.35:
1
$sudodocker pull mysql:5.6.35
After pulling down the big can follow the official instructions no brain start, but external inaccessible, so bound port:
1
$sudodocker run --name mysql -p 12345:3306 -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.6.35
In the previous chapter "Docker Kafka study, one of the trilogy: the Speed of experience Kafka" we quickly experienced the Kafka message distribution and subscription functions, but the impression of the environment is only the implementation of a few commands and scripts, this chapter we learn how to write these scrip
Build a kafka cluster environment in a docker container
Kafka cluster management and status saving are implemented through zookeeper. Therefore, you must first set up a zookeeper cluster.
Zookeeper cluster Construction
I. software environment:
The zookeeper cluster requires more than half of the nodes to survive for external services. Therefore, the number of s
: -./app:/app depends_on: -Zoo -Kafka command: [' Python3 ', ' consumer.py ']1 A total of 4 containers, 1 zookeeper (Save the log data, similar to the backend in celery, actually more like Git), 1 Kafka (similar broker), and then the production, the consumer eachSay it separately.1zookeeperThis has an official
Kafka Cluster management, state saving is realized through zookeeper, so we should build zookeeper cluster first
Zookeeper Cluster setup
First, the SOFTWARE environment:
The zookeeper cluster requires more than half of the node to survive to be externally serviced, so the number of servers should be 2*n+1, where 3 node is used to build the zookeeper cluster.
1.3 Linux servers are created using the Docker c
Implementation Architecture
A scenario implementation architecture is shown in the following illustration:
Analysis of 3.1 producer layer
Service assumptions within the PAAs platform are deployed within the Docker container, so to meet non-functional requirements, another process is responsible for collecting logs, thus not intruding into service frameworks and processes. Using flume ng for log collection, this open source component is very powerful
Docker--kafka-manager installation This article mainly describes how to install Kafka-manager in Docker.
1, download Kafka-manager mirror image: Docker pull Sheepkiller/
-round.
3 Implementing the Architecture
A schema implementation architecture is shown in the following figure:
Analysis of 3.1 producer layer
The service assumptions within the PAAs platform are deployed within the Docker container, so in order to meet the non-functional requirements, another process is responsible for collecting logs and therefore does not invade the service framework and processes. Using flume ng for log collection, this open s
is the CMD command, indicating the operation command when running the container.Dockerfile official documentation:Https://docs.docker.com/engine/reference/builder/Dockerfile best practices:Https://docs.docker.com/engine/userguide/eng-Image/dockerfile_best-practices/Docker official
GitLab construction and maintenance (based on Docker image sameersbn/docker-gitlab)1. Read the basics of this Article
Familiar with git
Familiar with docker
2. GitLab introduction 2.1. Overview
GitLab is an open-source project used for warehouse management systems. A web service built on Git as a code management t
Reprint please indicate the source:https://blog.csdn.net/forezp/article/details/80098675This article is from Fang Zhibong's blog
This series of tutorials is translated into the Docker document, document address: https://docs.docker.com/, for some reason, the official Docker document is usually not open, if not open, after installing
file named Dockerfile, copy the following into the file, and save it.
# Use of the official Python runtime as a parent image from
Python:2.7-slim
# Set The working directory To/app
WO Rkdir/app
# Copy The current directory contents to the container At/app
ADD./app
# Install any needed PA Ckages specified in Requirements.txt
RUN pip install--trusted-host pypi.python.org-r requirements.txt
# Make PO RT a
the following:1. Log in to your Ubuntu installation as a sudo privileged user 2. Upgrade your APT package index [Plain]View PlainCopy
$ sudo apt-get update
3. Installing Docker[Plain]View PlainCopy
$ sudo apt-get install Docker-engine
4. start the Docker daemon [Plain]View PlainCopy
$ sudo service
the standard format for application publishing. Whether you are using docker pullimage or in Dockerfile, write from image from Docker official Registrydocker pull image > What the hell was going on back there? Before we answer this question, we need to understand how
kernel container door was opened.
In the 2008, the Linux Container (i.e. LXC) feature, which was led by Google developers, was implemented in the Linux kernel. LXC is a kernel-level virtualization technology, mainly based on namespaces and cgroups Technology, to achieve the sharing of an operating system kernel under the premise of process resource isolation, providing a stand-alone virtual execution environment for the process, such a virtual execution environment is a container. Essentially,
: This article mainly introduces one of the most frequently replied posts in the official Docker Forum, "upgrading data in a data container". if you are interested in PHP tutorials, refer to it. One of the most frequently replied posts in the official Docker Forum: "Upgrading data in a data container"
MatlehmannI have
you delete an image in this way, because there will be some issues in the future (the official did not say anything about the impact ), the official step forward is to first Delete the container dependent on the image and then delete the image.
Summary
General idea: The Yum command installs Docker directly, downloads the desired image and launches
1, Environment, CENTOS7 Minimal 64-bit, Docker must have 64-bit system2. Install directly via Yum command, Yum installs Docker3. Start Docker and set it to boot(1) Start, systemctl start Docker.service(2) boot up,
@souyunku:/opt# docker images souyunku-appREPOSITORY TAG IMAGE ID CREATED SIZEsouyunku-app v1 8ec4e85a0f05 2 minutes ago 681MB
3. Run the image
The background daemon runs and maps the container port to the Internet port 80.
root@souyunku:/opt# docker run --name MySpringBoot -d -p 80:80 souyunku-app:v1e68d438603619e36
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.