docker-compose命令


docker-compose up &  #后台启动
docker-compose up      #全部服务启动
docker-compose up eurake0  #指定具体的服务启动

docker-compose down
docker-compose down eurake0  #卸载掉eurake0服务



docker-compose start eurake1

docker-compose stop eurake1

docker-compose logs       #查看日志
docker-compose logs  eurake0     #查看具体某个服务日志

docker-compose -f   #指定文件 默认docker-compose.yml

docker-compose --help

 

docker-compose down

[root@c227 docker-compose]# docker-compose down
Stopping docker-compose_eurake1_1 ... done
Stopping docker-compose_eurake0_1 ... done
Removing docker-compose_eurake0_run_1 ... done
Removing docker-compose_eurake1_run_1 ... done
Removing docker-compose_eurake1_1     ... done
Removing docker-compose_eurake0_1     ... done

Removing network docker-compose_default
 

在docker-compose down,然后docker-compose ps,就没了docker-compose进程,也就不能用docker-compose start,

用docker-compose up -> docker-compose stop -> docker-compose start (正确)

用docker-compose up -> docker-compose down -> docker-compose start (错误)

docker-compose ps
Name   Command   State   Ports
------------------------------

 

docker-compose stop

docker-compose stop
Stopping docker-compose_eurake1_1 ... done
Stopping docker-compose_eurake0_1 ... done
 

 

docker-compose start

docker-compose start
Starting eurake0 ... done
Starting eurake1 ... done
 

 

 

 

你可能感兴趣的:(docker)