DEV Community

Jeg
Jeg

Posted on

Docker: [output clipped, log limit 2MiB reached]

Sometimes the builds inititated from Dockerfile would be taking longer time to complete than usual. This depends on the step we write in the Dockerfile and the process it would take to complete that particular step as a layer.

If an entire project wants to get built as a docker image then we may end up with log limiting issues in docker depending on the specification of the VM where the docker is installed.

If an error pops up like: "docker clipped log limit", please follow the configuration provided below to get it resolved.

Configuration to be added in the docker.service file.

Navigate to the below location:
/etc/systemd/system/multi-user.target.wants/

edit the file "docker.service"

Then, under the [Service] tag, add the environment variables:
Environment="BUILDKIT_STEP_LOG_MAX_SIZE=95971520"
Environment="BUILDKIT_STEP_LOG_MAX_SPEED=7048576"

This would increase the log size in docker.

Top comments (0)