before we use docker compose, please install docker and docker-compose first : https://docs.docker.com/compose/install/
- access the docker folder (cd docker/sharding-jdbc/sharding)
- launch the environment by docker compose (docker-compose up -d)
- access mysql / etcd / zookeeper as you want
- if there is conflict on port, just modify the corresponding port defined in docker-compose.yml and then launch docker compose again(docker-compose up -d)
- if you want to stop these environment, use command docker-compose down
- access the docker folder (cd docker/sharding-proxy/sharding)
- launch the environment by docker compose (docker-compose up -d)
- access proxy by
mysql -h127.0.0.1 -P13308 -proot -uroot
- if there is conflict on port, just modify the corresponding port defined in docker-compose.yml and then launch docker compose again(docker-compose up -d)
- if you want to stop these environment, use command docker-compose down
to clean the docker container , you could use docker rm docker ps -a -q
(be careful)