Repository navigation
fix: set json-file logging driver for default log options - #62
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
pilat
force-pushed
the
fix/logging-driver-json-file
branch
from
October 15, 2026 02:25
f041b7b to
4015f9a
Compare
devbox injects max-size/max-file logging options into services without an explicit logging driver. When the daemon's default driver is 'local' (as on recent Docker Desktop), 'max-file=1' is incompatible with its compression and container creation fails with "compression cannot be enabled when max file count is 1". Set the driver to json-file explicitly in the default logging config, keeping the same options. Services that already define their own logging configuration are untouched.
pilat
force-pushed
the
fix/logging-driver-json-file
branch
from
October 15, 2026 02:50
4015f9a to
c71b0fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
devbox upfails on Docker Desktop 4.95.0 (Engine 29.8.2, macOS arm64) with:Cause
Devbox injects default logging options (
max-size: 10m,max-file: 1) into every service that has no explicit logging configuration, but it never sets the logging driver itself. The options are therefore applied to whatever the daemon's default driver is:json-fileacceptsmax-file=1with no compression, so it worked by accident on setups wherejson-filewas the daemon default.local(used by recent Docker Desktop) keeps a single compressed file per container. Its compression is incompatible withmax-file=1, so container creation fails.Because the failure depends on the daemon configuration, the same manifest worked on some machines and failed on others.
Fix
applyDefaultLoggingnow setsdriver: json-fileexplicitly together with the existingmax-size/max-fileoptions, so container creation no longer depends on the daemon's default logging driver. Services that define their own logging configuration in compose files are untouched, anddocker logs/ log viewers keep working sincejson-fileremains the standard readable driver.Tests
internal/project/logging_test.gocovers both paths ofapplyDefaultLogging: services without logging config receive thejson-filedriver with the expected options, and services with their own logging config are preserved.go test ./internal/project/ -racepasses;golangci-lintreports no issues.