using pipework to configure the Docker container to the local network environment
Demand
In the process of using Docker, we sometimes have the need to configure the Docker container to the same network segment as the host. To achieve this demand, we simply will
It is important to note that the image files downloaded from the Docker pool are identical to the official image files.After installing Docker, you can use the official registry image to build a set of local private warehouse environments:
Docker run –d –p : Registry
After the input can wait, in fact, the local repository itself is a contai
ObjectiveIn Docker engine v1.12, using swarm can easily create a overlay mode network, but it can only be used by the service below Swarm, which is completely isolated relative to container. In v1.13, when running containers, you can join the overlay network that was previously customized in swarm mode!1. Create swarm in one Docker host (172.100.1.17)$
1. Export container If you want to export a local container, you can use the Docker Export command to
export the container snapshot to a local file
.
$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7691a814370eUbuntu:14.04 "/bin/bash" $hours agoExited (0) +hours ago Test
$ sudo
0Fi/usr/local/mongodb/bin/mongod--smallfiles--nojournal pass=${mongodb_pass:-$ (pwgen-s 12 1)}_word=$ ([${mongodb_pass}] echo "Preset" | | echo "random")Ret=1while [[Ret-ne 0]]; Doecho "= Waiting for confirmation of MongoDB service startup"Sleep 5MONGO admin--eval "Help" >/dev/null 2>1Ret=$?Done#通过docker logs + ID to see the following outputecho "= Creating an Admin user with a ${_word} password in MongoDB"MONGO admin--eval "Db.adduser ({User: ' adm
Deploying Hadoop distributed clusters using DockerLooking for a long time on the internet did not find the use of Docker to build a Hadoop distributed cluster of documents, no way, can only write one.One: Environment preparation:1: First, you have a CENTOS7 operating system that can be installed in the virtual machine.2: The version of Docker,
The Docker hub works with Docker and its components. The Docker hub will help you collaborate with your colleagues and get the most functional docker. To do this, the services it provides are:
Docker Mirror Host
User authentication
Automatic mirroring of Build an
Xe
System
Oracle
Operating system:
Root
Admin
So that we can use this container for development, such as a project that requires 3 Oracle servers:Docker run-d-P 101:22-p 1521:1521-p 8080:8080--name oracle1 alexeiled/docker-oracle-xe-11gDocker run-d-P 102:22-p 1522:1521-p 8081:8080--name oracle2 alexeiled/
How can I develop Docker applications using PHP + MySQL?
20141206234218_104.png (170.93 KB, Downloads: 37)Download attachmentUploadIn program development, only one technology is definitely not enough. many applications need to be developed using multiple technologies. Today, let's talk about how to build a Linux + Apache + MySQL + PHP application
This article describes the configuration of simple load balancing on the Docker, host for the Ubuntu 14.04.2 LTS, two CentOS containers, host installation Nginx, two containers installed TOMCAT7. The structure is as follows:
The rationale for this scenario is to map the port of the host and the port of the Docker container (that is, a port accessing the host will map to the port of the
--name testmysql-e mysql_root_password=123456-d mysql6a38e59ef95d1a3f63a12d9c6c2ae20cf782001f25641f5159812e2a707f3f1d[email protected]:~$ Docker PS-acontainer ID IMAGE COMMAND CREATED STATUS PORTS names6a38e59ef95d MySQL"docker-entrypoint ..." 2Seconds ago Up2Seconds0.0.0.0:53306-3306/TCP testmysql74d9a010c9b5 MySQL"docker-entrypoint ..." -Minutes ago Up6Min
Foreword because most of the image download websites are abroad, Chinese users often encounter slow download speeds when downloading images; in addition, when Docker is applied to the production environment, it also faces the security issue of the downloaded Docker image. Because some private data is built in the production environment
Preface
Because most of the image download websites are abroad, Chinese
Docker creates mirrors based on containers that already have mirrors* Docker run Centos/bin/bash first causes the mirror to open the container.* Docker start DE8 launches the specified mirror container. De8 is the ID of the image and can be shortened to 3 bits.* After running Docker exec-it De8/bin/bash, enter into the
container to share the IP and port of the container. In addition to the network of two containers shared, other such as file system, process, etc. or isolated.4:none mode,--net=none.In this mode, Dokcer does not make any network configuration for the container. We need to add the network card for the container, configure the IP.Therefore, if you want to use pipework to configure the IP address of the Docker container, you must be in the None mode.Pip
How to build a private docker repository using CentOSPreface
Because most of the image download websites are abroad, Chinese users often encounter slow downloading speeds when downloading images. In addition, when Docker is applied to the production environment, whether the downloaded Docker image is secure or not.
Bu
Install Docker CE on Linux using the installation method from the package, linuxdocker
Install Docker CE on Linux using the installation method from the package
1. view the Linux system information nuame-
My products are Debian and amd64.
2. view the Linux system release version name lsb_release-cs
Mine is stretch.
3
Connection ID is 3Server version:5.7.21 MySQL Community Server (GPL)Copyright (c), 2018, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of the Oracle Corporation and/or itsAffiliates. Other names trademarks of their respectiveOwners.Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.mysql> show databases;+--------------------+| Database |+--------------------+| Information_schema || Chavin || MySQL || Performance_schema || S
Mdb1/bin/bashAfter entering the main database container,Vi/etc/mysql/my.cnfRemove the comments from the "Server-id = 1" line, save, exit the container, andDocker Restart MDB1Similarly, changing the MY.CNF from the database to "Server-id = 2" needs to be more than the main Server-idLarge numbers, MDB2 also need to be restarted.3.4Using a client connection on the primary database, here I am using MySQL Workbench, from the database becauseSecurity consi
IntroducedDocker is an open source software project that allows applications to automate their work under the software container, providing an additional layer of software abstraction on the Linux operating system and an automated management mechanism for operating system-level virtualization [1]. Docker uses resource-splitting mechanisms in the Linux core, such as Cgroups, and the Linux core namespace (name space) to create a separate software contai
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.