使用docker搭建 tars 开发环境

2022-02-15
1分钟阅读时长
docker pull tarscloud/framework

docker run -d --net=host -e MYSQL_HOST=xxxxx -e MYSQL_ROOT_PASSWORD=xxxxx \
     -eREBUILD=false -eINET=eth0 -eSLAVE=false \
     -v/data/tars:/data/tars \
     -v/etc/localtime:/etc/localtime \
     tarscloud/framework
# custom    
docker run -d -eMYSQL_HOST=192.168.1.10 -eMYSQL_USER=root -p 3000:3000 -p 18993:18993 \
		 -eMYSQL_ROOT_PASSWORD=lbbniu@yang0321  \
     -eREBUILD=true -eINET=eth0 -eSLAVE=false \
     --name tarsframework \
     tarscloud/framework
docker run -d -eMYSQL_HOST=10.14.166.155 -eMYSQL_USER=root -p 3000:3000 \
     -eMYSQL_ROOT_PASSWORD=123456 \
     -eREBUILD=false -eINET=eth0 -eSLAVE=false \
     --name tarsframework \
     tarscloud/framework
     
docker run -ti --rm tarscloud/framework bash     
docker pull tarscloud/tars
docker run -d --net=host -e MYSQL_HOST=xxxxx -e MYSQL_ROOT_PASSWORD=xxxxx \
     -eREBUILD=false -eINET=eth0 -eSLAVE=false \
     -v/data/tars:/data/tars \
     -v/etc/localtime:/etc/localtime \
     tarscloud/tars
     
# custom
docker run -d --net=host -e MYSQL_HOST=xxxxx -e MYSQL_ROOT_PASSWORD=xxxxx \
     -eREBUILD=false -eINET=eth0 -eSLAVE=false \
     -v/data/tars:/data/tars \
     -v/etc/localtime:/etc/localtime \
     tarscloud/tars
     
docker run -d \
    --name=tars-framework \
    --net=host \
    -e MYSQL_HOST="10.101.124.80" \
    -e MYSQL_ROOT_PASSWORD="lbbniu@yang0321" \
    -e MYSQL_USER=root \
    -e MYSQL_PORT=3306 \
    -e REBUILD=false \
    -e SLAVE=false \
    -e INET=eth0 \
    -v /etc/localtime:/etc/localtime \
    -v /data/tars:/data/tars \
    tarscloud/framework:v3.0.4
    
    export https_proxy=http://10.0.113.145:7890 http_proxy=http://10.0.113.145:7890 all_proxy=socks5://10.0.113.145:7890
    
./install.sh http://tars-0.tars-svc:3000 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJhZG1pbiIsImlhdCI6MTY0Mzk3MDUzMywiZXhwIjoxNjkzNTY0MTMzfQ.EDfViYVw1OQVe06hUrN4t0L5c6hMYPIV6c0KbyyHdGc tars-0.tars-svc mysql-service 3306 tarsAdmin Tars@2019

curl http://10.0.0.4:8200/json/Trace.TarsTraceFrontServer.FrontendObj/Add -d '{"a":100, "b":200}'; echo
curl http://10.0.0.4:8200/json/Trace.TarsTraceFrontServer.FrontendObj/Sub -d '{"a":200, "b":200}'; echo