Reputation: 792
While Building my docker Image in Docker Desktop for windows,after some sort of time It throwing a error:
=> => # [output clipped, log limit 1MiB reached]
I tired configuring the log file size in daemon file and restarted the docker service
"log-driver": "json-file",
"log-opts":
{
"max-size": "10m",
"max-file": "3"
}
But still I'm getting the same error, Any one please advise me on this ?
Upvotes: 37
Views: 31727
Reputation: 2018
You can use below one-line command when you use buildx:
docker buildx build . --builder "$(docker buildx create --driver-opt env.BUILDKIT_STEP_LOG_MAX_SIZE=10000000 --driver-opt env.BUILDKIT_STEP_LOG_MAX_SPEED=10000000)"
Upvotes: 2
Reputation: 120
I encountered that happened because buildkit is enabled. So I disabled buildkit and it works fine for me:
"features": {
"buildkit": false
}
Upvotes: 0
Reputation: 5657
Per https://docs.docker.com/config/containers/logging/configure/ it suggests to:
Restart Docker for the changes to take effect for newly created containers. Existing containers do not use the new logging configuration.
Unfortunatelly docker build
doesn't support --log-opt max-buffer-size=XXXm
, but buildx
does
As "the last shoot", you can remove --progress plain
if you don't acutally need it
Upvotes: 9