问题
查看docker容器日志,使用了如下命令:
docker logs -f --tail 0b83f42a0efa
报错:
[root@localhost /]# docker logs -f --tail 0b83f42a0efa "docker logs" requires exactly 1 argument. See 'docker logs --help'. Usage: docker logs [OPTIONS] CONTAINER Fetch the logs of a container
分析
"docker logs" requires exactly 1 argument. • 1
"docker logs"需要一个参数 |
解决
给 --tail 加上参数:
docker logs -f --tail 100 0b83f42a0efa