docker 运维查看指定应用log文件位置和名称

avatar
作者
筋斗云
阅读量:0

启动docker: systemctl start docker
停docker:systemctl stop docker
重启docker:systemctl restart docker
查看docker状态:systemctl status docker
开机启动:systemctlenable docker
查看docker概要信息:docker info
查看docker总体帮助文档:docker --help
查看docker命令帮助文档:docker具体命令--help

镜像命令

docker images

docker stop logstash
 docker start logstash
  docker logs -f  logstash --tail 50
docker stop logstash

查看再用的应用
  docker ps -a

logstash 启停
  docker start logstash
   docker stop logstash

查看指定日志位置
docker inspect --format='{{.LogPath}}' kibana

docker exec -it fe20811e7fe1 /bin/bash
docker run -it ubuntu /bin/bash

CONTAINER ID   IMAGE                                                  COMMAND                   CREATED        STATUS        PORTS                                                                                  NAMES
935bc912f9df   elastic/logstash:7.10.2                                "/usr/local/bin/dock…"   6 months ago   Up 3 months   0.0.0.0:5044->5044/tcp, :::5044->5044/tcp, 0.0.0.0:9600->9600/tcp, :::9600->9600/tcp   logstash
5d30162a9088   docker.elastic.co/kibana/kibana:7.10.2                 "/usr/local/bin/dumb…"   7 months ago   Up 3 months   0.0.0.0:5601->5601/tcp, :::5601->5601/tcp                                              kibana
22c998c8f95c   docker.elastic.co/elasticsearch/elasticsearch:7.10.2   "/tini -- /usr/local…"   7 months ago   Up 3 months   0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 0.0.0.0:9300->9300/tcp, :::9300->9300/tcp   elasticsearch

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!