lazydocker
lazydocker copied to clipboard
Config not merged with default
Describe the bug My config file settings are ignored, although a syntax error in that file causes an error.
To Reproduce
- copy the default config file to .config/lazydocker/config.yml
- restart lazydocker
- an error occurs : syntax error line xxx
- remove the typo that causes an error in the sidePanelWidth second comment
- restart lazydocker
- the settings are ignored, and the About panel shows the default settings instead of my "lazydocker config merged with the defaults"
Expected behaviour My settings should be merged with the default
Desktop (please complete the following information):
- OS: debian
- Lazydocker Version
Version: 0.20.0
Date: 2022-11-12T04:29:12Z
BuildSource: binaryRelease
Commit: 530dbbe57009f4596bfeedba1c8169becd98b9a8
OS: linux
Arch: amd64
Settings file
gui:
scrollHeight: 2
language: 'auto' # one of 'auto' | 'en' | 'pl' | 'nl' | 'de' | 'tr'
theme:
activeBorderColor:
- green
- bold
inactiveBorderColor:
- white
optionsTextColor:
- blue
returnImmediately: true
wrapMainPanel: true
# Side panel width as a ratio of the screen's width
sidePanelWidth: 0.333
# Determines whether we show the bottom line (the one containing keybinding
# info and the status of the app).
showBottomLine: true
# When true, increases vertical space used by focused side panel,
# creating an accordion effect
expandFocusedSidePanel: true
logs:
timestamps: false
since: '' # set to '' to show all logs
tail: '200' # set to 200 to show last 200 lines of logs
commandTemplates:
dockerCompose: docker-compose
restartService: '{{ .DockerCompose }} restart {{ .Service.Name }}'
up: '{{ .DockerCompose }} up -d'
down: '{{ .DockerCompose }} down'
downWithVolumes: '{{ .DockerCompose }} down --volumes'
upService: '{{ .DockerCompose }} up -d {{ .Service.Name }}'
startService: '{{ .DockerCompose }} start {{ .Service.Name }}'
stopService: '{{ .DockerCompose }} stop {{ .Service.Name }}'
serviceLogs: '{{ .DockerCompose }} logs --since=60m --follow {{ .Service.Name }}'
viewServiceLogs: '{{ .DockerCompose }} logs --follow {{ .Service.Name }}'
rebuildService: '{{ .DockerCompose }} up -d --build {{ .Service.Name }}'
recreateService: '{{ .DockerCompose }} up -d --force-recreate {{ .Service.Name }}'
allLogs: '{{ .DockerCompose }} logs --tail=300 --follow'
viewAlLogs: '{{ .DockerCompose }} logs'
dockerComposeConfig: '{{ .DockerCompose }} config'
checkDockerComposeConfig: '{{ .DockerCompose }} config --quiet'
serviceTop: '{{ .DockerCompose }} top {{ .Service.Name }}'
oS:
openLinkCommand: open {{link}}
stats:
graphs:
- caption: CPU (%)
statPath: DerivedStats.CPUPercentage
color: blue
- caption: Memory (%)
statPath: DerivedStats.MemoryPercentage
color: green
The settings in ld's About panel :

"lazydocker config merged with the defaults"
Could you please post the entire config?
how do you get the version ?
Just run: lazydocker --version
FWIW, can confirm this happens even if CONFIG_DIR is set (which takes any "are you sure your config file is in the right place" questions off the table).
I think I have the same issue. If I make a typo, I get an error. If I set "gui:returnImmediately: true" indeed it works. But it seems a lot of my other configuration gets ignored. For example copying the default config and setting the border to double changes nothing.
So it seems to me that only some of the keys are ignored. Explaining also why this bug can exist for so long without being noticed.
Anyone has a fix?
Edit: I also noticed that adding unexpected keys to the yaml does not error out. I think it should be validated to avoid such issue.
Edit: actually I noticed that running "lazydocker --version" returned this:
Version:
Date:
BuildSource: Docker
Commit:
OS: linux
Arch: amd64
So I figured it was probably a container issue so I switched to the the released binary and it works fine now.