Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to deploy the test environment with Docker

Shulou Source: shulou.com Published: 2022-06-01 14:00:42 11月15日 Update

This article mainly explains "how to deploy a test environment with Docker". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "how to deploy test environment with Docker"!

Core components:

docker client and server

Docker image: is the build and packaging phase, made up of file systems stacked together. is a series of read-only layers.

registry: Save user-built images

Docker container: startup or execution phase. It's a mirror reading and writing layer.

Data Volume-v: Enables data sharing and persistence between containers. The v on the container or the v on the host can be linked

Test environment setup process

the first day

1. Prepare machine, centos643, 3.10 kernel. 88G+ cp01-ee-swarm16.cp01.baidu.com root isys.INIT@2014

2. Install docker on the machine

3. Configure docerk private server et-dr.baidu.com machine p01-xiaolvyun-docker05.cp01.baidu.com root isys.INIT@2014

4.pull base image,[see tag at et-dr.baidu.com/v2/mysql/tags/list]

mysql: docker pull et-dr.baidu.com/macross/mysql:5.6

redis: docker pull et-dr.baidu.com/redis:3.0.2

mongo: docker pull et-dr.baidu.com/mongo:3.0.4

zookeeper: docker pull et-dr.baidu.com/zookeeper

activemq:docker pull et-dr.baidu.com/macross/activemq:5.8

gerrit:docker pull et-dr.baidu.com/gerrit:2.12.2

the next day

Prepare the configuration file of the basic image (mysql and activemq configuration files are in the icode library [baidu/hsiaoyan/icode-env], clone directly to the machine

The data volume directory is located at/home/work/workdir/

http://wiki.baidu.com/pages/viewpage.action? pageId=261825352

Start redis:docker run --name redis -p 8379:6379 --restart=always -v /home/work/workdir/redis/:/data -d --name redis af1425461c91 redis-server --appendonly yes

Verification redis: redis-cli -h cp01-ee-swarm16.cp01.baidu.com-p 8379 && info

At this point, I believe that everyone has a deeper understanding of "how to deploy a test environment with Docker". Let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Tags: Mirror environment test machine container data file configuration content foundation phase preparation learning utility deeper interest kernel practicality customer Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Linux OPPO Reno MariaDB Redmi