docker-compose部署SpringCloud

1.安装 docker-compose

将 docker-compose-Linux-x86_64 传到  /usr/local/bin 目录下,并改名为 docker-compose

2.设置权限  [ ~]# chmod +x /usr/local/bin/docker-compose

docker-compose部署SpringCloud

[ ~]# docker-compose version

docker-compose部署SpringCloud

 安装 git、java、maven

[ ~]# yum install -y git java maven

安装结束后,查看版本

docker-compose部署SpringCloud

 克隆代码:

[ ~]# yum install -y git java maven
[ ~]# git clone https://gitee.com/log4j/pig.git
[ ~]# cd pig/
[ pig]# mvn clean install -Dmaven.test.skip=true

docker-compose部署SpringCloud

# 构建镜像
[ pig]#docker-compose build
# 启动服务;
[ pig]#docker-compose up -d
# 停止服务
[ pig]#docker-compose down --rmi all -v
# 查看日志
[ pig]#docker-compose logs -f

docker-compose部署SpringCloud

 docker-compose部署SpringCloud

 docker-compose部署SpringCloud

 docker-compose部署SpringCloud

 docker-compose部署SpringCloud

相关推荐