Bash的换行符为 \\
CMD的换行符为 \^
Powershell的换行符为 \`
关系型数据库
MySQL
docker pull bitnami/mysql:latest docker run -itd \ --name mysql-test \ -p3306:3306 \ -eALLOW_EMPTY_PASSWORD=yes \ -eMYSQL_ROOT_PASSWORD=123456 \ bitnami/mysql:latest
MariaDB
docker pull bitnami/mariadb:latest docker run -itd \ --name mariadb-test \ -p3306:3306 \ -eALLOW_EMPTY_PASSWORD=yes \ -eMARIADB_ROOT_PASSWORD=123456 \ bitnami/mariadb:latest
PostgresSQL
docker pull bitnami/postgresql:latest docker pull bitnami/postgresql-repmgr:latest docker pull bitnami/pgbouncer:latest docker pull bitnami/pgpool:latest docker pull bitnami/postgres-exporter:latest docker run -itd \ --name postgres-test \ -p5432:5432 \ -ePOSTGRES_PASSWORD=123456 \ bitnami/postgresql:latest docker exec -it postgres-test "apt update"
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";CREATE EXTENSION IF NOT EXISTS "postgis";SELECT version();SELECT postgis_full_version();
SQLServer
docker pull mcr.microsoft.com/mssql/server:2019-latest docker run -itd \ --name MSSQL_1433 \ -m 512m \ -e"ACCEPT_EULA=Y" \ -e"SA_PASSWORD=Abcd123456789*" \ -p1433:1433 \ mcr.microsoft.com/mssql/server:2019-latest
TiDB
docker pull pingcap/tidb:latest docker pull pingcap/tikv:latest docker pull pingcap/pd:latest docker run -itd \ --name tidb-test \ -v /data/tidb/data:/tmp/tidb \ --privileged=true \ -p4000:4000 \ -p10080:10080 \ pingcap/tidb:latest
图数据库
Neo4J
docker pull bitnami/neo4j:latest docker run -itd \ --name neo4j-test \ -p7473:7473 \ -p7687:7687 \ -p7474:7474 \ -eNEO4J_PASSWORD=bitnami \ bitnami/neo4j:latest
时序型数据库
InfluxDB
docker pull bitnami/influxdb:latest docker run -itd \ --name influxdb-test \ -p8083:8083 \ -p8086:8086 \ -eINFLUXDB_HTTP_AUTH_ENABLED=true \ -eINFLUXDB_ADMIN_USER=admin \ -eINFLUXDB_ADMIN_USER_PASSWORD=123456789 \ -eINFLUXDB_ADMIN_USER_TOKEN=admintoken123 \ -eINFLUXDB_DB=my_database \ bitnami/influxdb:latest
create user "admin" with password '123456789' with all privileges
管理后台: http://localhost:8086/
TimescaleDB
docker pull timescale/timescaledb:latest-pg14 docker pull timescale/timescaledb-postgis:latest-pg13 docker pull timescale/pg_prometheus:latest-pg11 docker run -itd \ --name timescale-test \ -p5432:5432 \ -ePOSTGRES_PASSWORD=123456 \ timescale/timescaledb-postgis:latest-pg13
OpenTSDB
docker pull petergrace/opentsdb-docker:latest docker run -itd \ --name opentsdb-test \ -p4242:4242 \ petergrace/opentsdb-docker:latest
QuestDB
docker pull questdb/questdb:latest docker run -itd \ --name questdb-test \ -p9000:9000 \ -p8812:8812 \ -p9009:9009 \ questdb/questdb:latest
TDengine
docker pull tdengine/tdengine:latest docker run -itd \ --name tdengine-test \ -p6030-6041:6030-6041 \ -p6030-6041:6030-6041/udp \ tdengine/tdengine:latest
ElasticSearch
docker pull bitnami/elasticsearch:latest docker run -itd \ --name elasticsearch-test \ -p9200:9200 \ -p9300:9300 \ -eELASTICSEARCH_USERNAME=elastic \ -eELASTICSEARCH_PASSWORD=elastic \ -e xpack.security.enabled=true \ -e discovery.type=single-node \ -e http.cors.enabled=true \ -e http.cors.allow-origin=http://localhost:13580,http://127.0.0.1:13580 \ -e http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization \ -e http.cors.allow-credentials=true \ bitnami/elasticsearch:latest docker pull appbaseio/dejavu:latest docker run -itd \ --name dejavu-test \ -p13580:1358 \ appbaseio/dejavu:latest http://localhost:13580/
Clickhouse
docker pull yandex/clickhouse-server:latest # 8123为http接口 9000为tcp接口 9004为mysql接口# 推荐使用DBeaver作为客户端docker run -itd \ --name clickhouse-server-test \ -p8123:8123 \ -p9000:9000 \ -p9004:9004 \ --ulimit \ nofile=262144:262144 \ yandex/clickhouse-server:latest
NoSQL数据库
MongoDB
docker pull bitnami/mongodb:latest docker pull bitnami/mongodb-exporter:latest docker run -itd \ --name mongodb-test \ -p27017:27017 \ -eMONGODB_ROOT_USER=root \ -eMONGODB_ROOT_PASSWORD=123456 \ -eMONGODB_USERNAME=test \ -eMONGODB_PASSWORD=123456 \ -eMONGODB_DATABASE=test \ bitnami/mongodb:latest
Redis
docker pull bitnami/redis:latest docker pull bitnami/redis-exporter:latest docker run -itd \ --name redis-test \ -p6379:6379 \ -eALLOW_EMPTY_PASSWORD=yes \ bitnami/redis:latest
Memcached
docker pull bitnami/memcached:latest docker pull bitnami/memcached-exporter:latest docker run -itd \ --name memcached-test \ -p11211:11211 \ bitnami/memcached:latest
CouchDB
docker pull bitnami/couchdb:latest docker run -itd \ --name couchdb-test \ -p5984:5984 \ -p9100:9100 \ -eCOUCHDB_PORT_NUMBER=5984-eCOUCHDB_CLUSTER_PORT_NUMBER=9100-eCOUCHDB_USER=admin -eCOUCHDB_PASSWORD=couchdb bitnami/couchdb:latest
Cassandra
docker pull bitnami/cassandra:latest docker pull bitnami/cassandra-exporter:latest docker run -itd \ --name cassandra-test \ -p7000:7000 \ -p9042:9042 \ -eCASSANDRA_USER=cassandra \ -eCASSANDRA_PASSWORD=cassandra \ bitnami/cassandra:latest
服务发现注册
etcd
docker pull bitnami/etcd:latest docker run -itd \ --name etcd-standalone \ -p2379:2379 \ -p2380:2380 \ -eETCDCTL_API=3 \ -eALLOW_NONE_AUTHENTICATION=yes \ -eETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379 \ bitnami/etcd:latest
管理工具: etcd-manager
Nacos
docker pull nacos/nacos-server:latest docker run -itd \ --name nacos-standalone \ -eMODE=standalone \ -p8849:8848 \ nacos/nacos-server:latest
管理后台: http://localhost:8849/nacos/index.html
Consul
docker pull bitnami/consul:latest docker pull bitnami/consul-exporter:latest docker run -itd \ --name consul-server-standalone \ -p8300:8300 \ -p8500:8500 \ -p8600:8600/udp \ -eCONSUL_BIND_INTERFACE='eth0' \ -eCONSUL_AGENT_MODE=server \ -eCONSUL_ENABLE_UI=true \ -eCONSUL_BOOTSTRAP_EXPECT=1 \ -eCONSUL_CLIENT_LAN_ADDRESS=0.0.0.0 \ bitnami/consul:latest
管理后台: http://localhost:8500
Apollo
注意,先要导入SQL数据!
docker pull apolloconfig/apollo-portal:latest docker pull apolloconfig/apollo-configservice:latest docker pull apolloconfig/apollo-adminservice:latest # docker run -itd \ --name apollo-configservice \ -p8080:8080 \ -eSPRING_DATASOURCE_URL="jdbc:mysql://127.0.0.1:3306/ApolloConfigDB?characterEncoding=utf8" \ -eSPRING_DATASOURCE_USERNAME=root \ -eSPRING_DATASOURCE_PASSWORD=123456 \ -v /tmp/logs:/opt/logs \ apolloconfig/apollo-configservice:latest docker run -itd \ --name apollo-adminservice \ -p8090:8090 \ -eSPRING_DATASOURCE_URL="jdbc:mysql://127.0.0.1:3306/ApolloConfigDB?characterEncoding=utf8" \ -eSPRING_DATASOURCE_USERNAME=root \ -eSPRING_DATASOURCE_PASSWORD=123456 \ -v /tmp/logs:/opt/logs \ apolloconfig/apollo-adminservice:latest docker run -itd \ --name apollo-portal \ -p8070:8070 \ -eSPRING_DATASOURCE_URL="jdbc:mysql://127.0.0.1:3306/ApolloPortalDB?characterEncoding=utf8" \ -eSPRING_DATASOURCE_USERNAME=root \ -eSPRING_DATASOURCE_PASSWORD=123456 \ -eAPOLLO_PORTAL_ENVS=dev \ -eDEV_META=http://127.0.0.1:8080 \ -v /tmp/logs:/opt/logs \ apolloconfig/apollo-portal:latest
Eureka管理后台:
Apollo管理后台:
账号密码: apollo / admin
消息队列
RabbitMQ
docker pull bitnami/rabbitmq:latest docker run -itd \ --hostname localhost \ --name rabbitmq-test \ -p15672:15672 \ -p5672:5672 \ -p1883:1883 \ -p15675:15675 \ -eRABBITMQ_PLUGINS=rabbitmq_top,rabbitmq_mqtt,rabbitmq_web_mqtt,rabbitmq_prometheus,rabbitmq_stomp \ bitnami/rabbitmq:latest rabbitmq-plugins --offline enable rabbitmq_peer_discovery_consul # rabbitmq_mqtt 提供与后端服务交互使用,端口1883rabbitmq-plugins enable rabbitmq_mqtt # rabbitmq_web_mqtt 提供与前端交互使用,端口15675rabbitmq-plugins enable rabbitmq_web_mqtt
管理后台: http://localhost:15672
默认账号: user
默认密码: bitnami
Kafka
docker pull bitnami/kafka:latest docker pull bitnami/zookeeper:latest docker pull bitnami/kafka-exporter:latest docker run -itd \ --name zookeeper-test \ -p2181:2181 \ -eALLOW_ANONYMOUS_LOGIN=yes \ bitnami/zookeeper:latest docker run -itd \ --name kafka-standalone \ --link zookeeper-test \ -p9092:9092 \ -v /home/data/kafka:/bitnami/kafka \ -eKAFKA_BROKER_ID=1 \ -eKAFKA_LISTENERS=PLAINTEXT://:9092 \ -eKAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092 \ -eKAFKA_ZOOKEEPER_CONNECT=zookeeper-test:2181 \ -eALLOW_PLAINTEXT_LISTENER=yes \ --user root \ bitnami/kafka:latest
管理工具: Offset Explorer
NSQ
docker pull nsqio/nsq:latest # nsqlookupddocker run -d \ --name lookupd \ -p4160:4160 \ -p4161:4161 \ nsqio/nsq:latest \ /nsqlookupd # nsqddocker run -itd \ --name lookupd \ -p4160:4160 \ -p4161:4161 \ nsqio/nsq:latest \ /nsqd --lookupd-tcp-address=nsqlookupd:4160 #nsqadmindocker run run -itd \ --name nsqadmin \ -p4171:4171 \ nsqio/nsq:latest \ /nsqadmin --lookupd-http-address=nsqlookupd:4161
管理后台: http://127.0.0.1:4171
NATS
docker pull bitnami/nats:latest docker pull bitnami/nats-exporter:latest docker run -itd \ --name nats-server \ --p4222:4222 \ --p6222:6222 \ --p8000:8222 \ -eNATS_HTTP_PORT_NUMBER=8222 \ bitnami/nats:latest
管理后台: https://127.0.0.1:8000
mosquitto
docker pull eclipse-mosquitto:latest # 1883 tcp# 9001 websocketsdocker run -itd \ --name mosquitto-test \ -p1883:1883 \ -p9001:9001 \ eclipse-mosquitto:latest
EMX
docker pull emqx/emqx:latest docker run -itd \ --name emqx-test \ -p18083:18083 \ -p1883:1883 \ emqx/emqx:latest
管理后台: http://localhost:18083
默认账号: admin
默认密码: public
Pulsar
docker pull apachepulsar/pulsar-manager:latest docker pull apachepulsar/pulsar:latest docker run -itd \ -p6650:6650 \ -p8080:8080 \ --name pulsar-standalone \ apachepulsar/pulsar:latest bin/pulsar standalone docker run -itd \ -p9527:9527 \ -p7750:7750 \ -eSPRING_CONFIGURATION_FILE=/pulsar-manager/pulsar-manager/application.properties \ apachepulsar/pulsar-manager:latest
运维监控
Jaeger
docker pull jaegertracing/all-in-one:latest docker run -d \ --name jaeger \ -eCOLLECTOR_ZIPKIN_HOST_PORT=:9411 \ -p5775:5775/udp \ -p6831:6831/udp \ -p6832:6832/udp \ -p5778:5778 \ -p16686:16686 \ -p14268:14268 \ -p14250:14250 \ -p9411:9411 \ jaegertracing/all-in-one:latest
管理后台: http://localhost:16686
Kibana
docker pull bitnami/kibana:latest docker run -d \ --name kibana \ -p5601:5601 \ --name kibana \ -eKIBANA_ELASTICSEARCH_URL=elasticsearch \ -eKIBANA_ELASTICSEARCH_PORT_NUMBER=9200 bitnami/kibana:latest
Prometheus
docker pull bitnami/prometheus:latest docker pull bitnami/pushgateway:latest docker run -d \ --name=prometheus-gateway \ -p5051:9091 \ bitnami/pushgateway docker run -d \ --name=prometheus \ -p5050:9090 \ bitnami/prometheus:latest
Prometheus后台: http://localhost:5050
Pushgateway后台: http://localhost:5051
Grafana
docker pull bitnami/grafana:latest docker run -d \ --name grafana \ -p3000:3000 \ bitnami/grafana:latest
Logstash
docker pull bitnami/logstash:latest docker pull bitnami/logstash-exporter:latest docker run -d \ -p8080:8080 \ bitnami/logstash:latest
Fluentd
docker pull bitnami/fluentd:latest docker pull bitnami/fluentd-exporter:latest docker run -d \ -p24224:24224 \ -p24224:24224/udp \ -v /data:/opt/bitnami/fluentd/log \ bitnami/fluentd:latest
流式计算
Spark
docker pull bitnami/spark:latest docker run -itd \ --name spark-standalone \ -p6066:6066 \ -p7077:7077 \ -p8080:8080 \ -p50070:50070 \ -eSPARK_MODE=master \ -eSPARK_WORKER_CORES=1 \ -eSPARK_WORKER_MEMORY=2g \ bitnami/spark:latest
hdfs的web界面:http://localhost:50070
spark界面:http://localhost:8080
Flink
docker pull flink:latest docker network create flink-network docker run -itd \ --name flink-jobmanager \ --network flink-network \ -p8081:8081 \ --envFLINK_PROPERTIES="jobmanager.rpc.address: flink-jobmanager" \ flink:latest jobmanager docker run -itd \ --name flink-taskmanager \ --network flink-network \ --envFLINK_PROPERTIES="jobmanager.rpc.address: flink-jobmanager" \ flink:latest taskmanager
管理后台: http://localhost:8081
其他
Minio
docker pull bitnami/minio:latest docker run -itd \ --name minio-server \ --envMINIO_ACCESS_KEY="minio-access-key" \ --envMINIO_SECRET_KEY="minio-secret-key" \ bitnami/minio:latest
机器学习
TensorFlow
docker pull bitnami/tensorflow-resnet:latest docker pull bitnami/tensorflow-serving:latest docker pull bitnami/tensorflow-inception:latest docker network create app-tier --driver bridge docker run -d--name tensorflow-serving \ --volume /tmp/model-data:/bitnami/model-data \ --network app-tier \ bitnami/tensorflow-serving:latest docker run -d--name tensorflow-resnet \ --volume /tmp/model-data:/bitnami/model-data \ --network app-tier \ bitnami/tensorflow-resnet:latest
PyTorch
docker pull bitnami/pytorch:latest
API网关
HAProxy
docker pull bitnami/haproxy:latest
Kong
docker pull bitnami/kong:latest
Nginx
docker pull bitnami/nginx:latest
Envoy
docker pull bitnami/envoy:latest
APISIX
docker pull apache/apisix:latest docker pull apache/apisix-dashboard:latest
管理后台: http://127.0.0.1:8080/apisix/dashboard
Tyk
docker pull tykio/tyk-gateway:latest
Gravitee
docker pull graviteeio/apim-gateway:latest docker pull graviteeio/apim-management-ui:latest docker pull graviteeio/apim-portal-ui:latest docker run \ --publish82:8082 \ --name gateway \ --envGRAVITEE_MANAGEMENT_MONGODB_URI=mongodb://username:password@mongohost:27017/dbname \ --detach \ graviteeio/apim-gateway:latest docker run \ --publish80:8080 \ --envMGMT_API_URL=http://localhost:81/management/organizations/DEFAULT/environments/DEFAULT \ --name management-ui \ --detach \ graviteeio/apim-management-ui:latest docker run \ --publish80:8080 \ --envPORTAL_API_URL=http://localhost:81/portal/environments/DEFAULT \ --name portal-ui \ --detach \ graviteeio/apim-portal-ui:latest
参考资料
https://docs.emqx.cn/broker/v4.3/#%E6%B6%88%E6%81%AF%E6%A1%A5%E6%8E%A5