1.安裝docker cejava
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repoyum install -y yum-utils device-mapper-persistent-data lvm2
yum install docker-ce
2.安裝 pip 及 docker-composepython
yum -y install epel-release
yum -y install python-pip
pip install --upgrade pip
pip install docker-compose
3.啓動dockermysql
service docker restart
4.clone nacos 並安裝linux
git clone https://github.com/nacos-group/nacos-docker.git cd nacos-docker
docker-compose -f example/standalone-mysql.yaml up
#啓動nacos
docker run --env MODE=standalone --name nacos -d -p 8848:8848 nacos/nacos-servergit
附:docker 命令集github
docker [run|start|stop|restart|kill|rm|pause|unpause] #容器生命週期管理 docker [ps|inspect|top|attach|events|logs|wait|export|port] #容器操做運維 docker [commit|cp|diff] #容器rootfs命令 docker [login|pull|push|search] #鏡像倉庫 docker [images|rmi|tag|build|history|save|import] #本地鏡像管理
docker exec -it
docker ps -a
經過 exec 命令對指定的容器執行 bash
docker exec -it 9df70f9a0714 /bin/bash
jdk安裝sql
yum search jdk yum install java-1.8.0-openjdk
java -version
maven安裝docker
yum install maven
mvn -version
docker rm `docker ps -a -q`
docker rmi `docker images -q`