0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

macOS docker log削除(laradock)

Posted at

macOS環境

 DockerはmacOS上のHyperKitという仮想化環境でLinuxKitという軽量Linuxを動かすので、Linux環境のような docker inspectでによりLogPathを見つかる削除はできない。下記CMD検証で削除できる
※ CONTAINER_NAMEを自分のコンテナ名を替えてください。

 docker run -it --rm --privileged --pid=host CONTAINER_NAME nsenter -t 1 -m -u -n -i -- sh -c 'truncate -s0 /var/lib/docker/containers/*/*-json.log'

linux環境

docker inspect 【コンテナ名】 | grep -i log

xxxx-json.logのログを消去(ゼロにする)すれば問題は解決

0
0
0

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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?