Clear the container logs on Docker Desktop for Mac
This article is an introduction to clearing the container logs in Docker Desktop for Mac.
The version at the time of writing is Docker Desktop for Mac 3.2.2(61853).
About Docker Desktop for Mac You can run docker inspect to get the path to the container log file.
$ docker inspect CONTAINER_ID –format "{{.LogPath}}" /var/lib/docker/containers/3d0305c254c33ff5e78d675f45e60fdcef65937ed8b53e21baf07f818d34ce9b/3d0305c254c33ff5e78d675f45e60fdcef65937ed8b53e21baf07f818d34ce9b-json.log If you have dockerd and containerd running on the same host as the docker container on Linux, you can cleaer the logs with a command like the following: