The database

docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql:latest docker run -dit --name neo4j -p 7474:7474 -p 7687:7687 --env=NEO4J_AUTH=none neo4j:3.5.13 docker run-dit --name redis -p 6379:6379 redis docker run -d --name redis -p 6379:6379 redis --requirepass"password"/redis-cli -h 127.0.0.1 -p 6379 -a myPassword docker run -dit --name mongo -p 27017:27017 mongoCopy the code

ES

version: "3.7"
services:
    kibana:
        image: Kibana: 7.4.2
        container_name: kibana
        environment:
            - ELASTICSEARCH_HOSTS=http://es01:9200
        ports:
            - 5601: 5601
        networks:
            - elastic
    es01:
        image: Elasticsearch: 7.4.2
        environment:
            - node.name=es01
            - cluster.name=es-docker-cluster
            - network.host=_local_,_site_
            - network.publish_host=_local_
            - discovery.type=single-node
            - bootstrap.memory_lock=true
            - "ES_JAVA_OPTS=-Xms750m -Xmx750m"
            - "ELASTIC_PASSWORD=password"
        ulimits:
            memlock:
                soft: - 1
                hard: - 1
            nofile:
                soft: 65535
                hard: 65535
        ports:
            - 9200: 9200
            - 9300: 9300
        networks:
            - elastic
networks:
  elastic:
    driver: bridge
Copy the code

IK participles need to be installed during use

Es docker exec it es /bin/bash // Use the bin directory to install elasticSearch -plugin. Ensure that the plugin is consistent with the ES version bin/elasticsearch-plugin install / / https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.4.2/elasticsearch-analysis-ik-7.4.2.zip Then restart the docker restart es containerCopy the code
  • 2.4- Docker ES installation plugin
  • ES – Simple use of ElasticSearch based on Golang
  • Elasticsearch — Docker deployment + IK tokenizer

Service discovery

Nacos

git clone https://github.com/nacos-group/nacos-docker.git cd nacos-docker docker-compose -f Example/standalone - Derby. Yaml up http://localhost:8848/nacos/#/login user name and password nacos nacosCopy the code

etcd

NODE1 = 192.168.1.21 DATA_DIR = "etcd - data"# v3REGISTRY=gcr.io/etcd-development/etcd docker run \ -p 2379:2379 \ -p 2380:2380 \ --volume=${DATA_DIR}:/etcd-data \ --name etcd ${REGISTRY}:latest \ /usr/local/bin/etcd \ --data-dir=/etcd-data --name node1 \ --initial-advertise-peer-urls http://${NODE1}:2380 --listen-peer-urls http://0.0.0.0:2380 \ --advertise-client-urls http://${NODE1}:2379 --listen-client-urls http://0.0.0.0:2379 \ --initial-cluster node1=http://${NODE1}:2380 docker run -p 2379:2379 -p 2380:2380 --volume=D:\temp\etcd:/etcd-data --name etcd quay.io/coreos/etcd:latest /usr/local/bin/etcd - data - dir = / etcd - data - the name node1 - initial - advertise - peer - urls http://192.168.101.104:2380 - listen - peer - urls http://0.0.0.0:2380 - advertise - the client - urls http://192.168.101.104:2379 - listen - the client - urls http://0.0.0.0:2379 - initial - cluster node1 = http://192.168.101.104:2380 docker pull buddho/etcd - browser docker run - rm - name etcd - browser -p 0.0.0.0:8000:8000 -- ENV ETCD_HOST=10.10.0.1 --env AUTH_PASS= DOE-t-I BUDDHO/ETcD-browserCopy the code

zookeeper

docker run -dit --name zk -p 2181:2181 zookeeper
Copy the code

The message queue

docker-activemq

docker run -dit --name activemq -p 11616:61616 -p 8161:8161 -p 1883:1883 rmohr/activemq
Copy the code

Initial account: admin admin user user

docker rabbitmq

docker run -dit --name rabbitmq -p 5672:5672 rabbitmq docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq Rabbitmq :management http://127.0.0.1:15672 Username and password: guest GuestCopy the code

other

Nginx

docker run -dit --name nginx --restart=always -p 80:80 -v D:/Docker/images/nginx/:/etc/nginx/ -v D:/Docker/images/nginx/download:/home/download/ nginx

docker run -dit --name nginx -p 80:80 -v D:/Docker/images/nginx/:/etc/nginx/ -v D:/Docker/images/nginx/download:/home/download/ nginx
Copy the code

Front-end and back-end interface management: Yapi

Git clone https://gitee.com/fjc0k/docker-YApi.git docker - compose up - d then YApi in http://localhost:40001 can visit. In docker-comemess. yml, YAPI_ADMIN_ACCOUNT is your administrator email and YAPI_ADMIN_PASSWORD is your administrator passwordCopy the code

Kong

  • Documentation for Kong Gateway (OSS)
  • Docker Installation
# linuxdocker run -d --name kong \ --network=kong-net \ -v "kong-vol:/usr/local/kong/declarative" \ -e "KONG_DATABASE=off" \ -e  "KONG_DECLARATIVE_CONFIG=/usr/local/kong/declarative/kong.yml" \ -e "KONG_PROXY_ACCESS_LOG=/dev/stdout" \ -e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" \ -e "KONG_PROXY_ERROR_LOG=/dev/stderr" \ -e "KONG_ADMIN_ERROR_LOG=/dev/stderr" \ -e "KONG_ADMIN_LISTEN = 0.0.0.0:8001, 0.0.0.0:8444 SSL "\ -p 8000:8000 \ -p 8443:8443 \ -p 127.0.0.1:8001:8001 \ -p 127.0.0.1:8444:8444 \ kong:latest

# windowsdocker network create kong-net docker run -d --name kong-database ` --network=kong-net ` -p 5432:5432 ` -e "POSTGRES_USER=kong" '-e "POSTGRES_DB=kong"' -e "POSTGRES_PASSWORD=kong" 'postgres:9.6 docker run --rm --network=kong-net ` -e "KONG_DATABASE=postgres" ` -e "KONG_PG_HOST=kong-database" ` -e "KONG_PG_PASSWORD=kong" ` -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" ` kong:latest kong migrations bootstrap docker run -d --name kong ` --network=kong-net ` -e "KONG_DATABASE=postgres" ` -e "KONG_PG_HOST=kong-database" ` -e "KONG_PG_PASSWORD=kong" ` -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" ` -e "KONG_PROXY_ACCESS_LOG=/dev/stdout" ` -e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" ` -e "KONG_PROXY_ERROR_LOG=/dev/stderr" ` -e "KONG_ADMIN_ERROR_LOG=/dev/stderr" ` -e "KONG_ADMIN_LISTEN = 0.0.0.0:8001, 0.0.0.0:8444 SSL "' -p 8000:8000 '-p 8001:8001' -p 8444:8444 'kong:latest curl -i http://localhost:8001/ docker run --rm pantsel/konga:latest -c prepare -a postgres -u Postgresql: / / kong: [email protected]:5432 / konga docker run - p, 1337:1337 ` - network kong -.net ` - name konga ` - e "NODE_ENV = production" ` -e "DB_ADAPTER = postgres ` -" e "DB_URI = postgresql: / / kong: [email protected]:5432 / konga" ` pantsel/kongaCopy the code

Portainer – Docker visual management tool to use details

# linux docker run -d -p 9000:9000 --name portainer --restart always -v D:/temp/docker/portainer/docker.sock:/var/run/docker.sock -v D:/temp/docker/portainer/data:/data portainer/portainer # windows docker run -d -p 9000:9000 --name portainer --restart always -v -v D:/temp/docker/portainer/docker_engine:/var/run/pipe/docker_engine -v D:/temp/docker/portainer/data:/data Portainer/Portainer user name and password: admin passwordCopy the code

Centos

docker run -tid --name centos8 -p 82:80 -v D:/temp/centos/:/root/ centos
Copy the code

Local mirror repository

docker run -d -p 5000:5000 --name registry --restart=always -v D:/Docker/registry:/var/lib/registry registry:latest # The docker deamon add 127.0.0.1:5000 # upload docker tag XXXX: test 192.168.110.196:5000 / XXXX: test docker push 192.168.110.196:5000 / XXXX: test # download docker pull 192.168.110.196:5000 / XXXX: testCopy the code
  • Docker: HTTPS client is not available when creating a local private repository and uploading images.
  • Private warehouses