LoginSignup
0

More than 5 years have passed since last update.

Docker Remote API 呼び出しのログ

Posted at

PhpStorm の Docker Remote Interpreters を試してたとき、PhpStorm からどのように API が呼ばれているかを見たかったのですが、ぱっとみ API 呼び出しはログされていなさそうでした。

環境は下記のとおり。

  • CentOS 7.3.1611
  • Docker Engine 17.03.0-ce

systemd の drop-in で下記のように --log-level=debug を追加すると、

[Service]
ExecStart=
ExecStart=/usr/bin/dockerd \
    -H unix:///var/run/docker.sock \
    -H tcp://0.0.0.0:2376 \
    --tlsverify \
    --tlscacert=/path/to/ca.pem \
    --tlscert=/path/to/server.pem \
    --tlskey=/path/to/server-key.pem \
    --log-level=debug

journalctl -u docker.service で API 呼び出しも出てくるようになりました。

Mar 14 14:02:02 xxx dockerd[7596]: time="2017-03-14T14:02:02.127110132+09:00" level=debug msg="Calling POST /cont    825 ainers/create"
Mar 14 14:02:02 xxx dockerd[7596]: time="2017-03-14T14:02:02.127110132+09:00" level=debug msg="form data: {\"AttachStdin\":true,...

ただ、その他にも凄まじい量のログが吐かれたので常用は辛そうでした。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0