Skip to content

Diun can't create docker client when current user does not exist. #1262

Open
@s17t

Description

@s17t

Support guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

When running diun as systemd service using diun user with home /dev/null the scheduled task will fails to check the images version against the registry.

WRN Error seeking Docker credentials error="reading registries.conf.d: lstat /dev/null/.config/containers/registries.conf.d: not a directory" image=xxx/xxx
[a line as abover for each image]
WRN Cannot get remote manifest error="cannot get image digest from HEAD request: failed to create client: stat /dev/null/.config/containers/certs.d/docker.io: not a directory"
INF Jobs completed added=0 failed=1 skipped=X unchanged=0 updated=0

Expected behaviour

It should not fails where the default registry locations does not exists or are unreadable.

Actual behaviour

Diun does not load image in its internal database.

Steps to reproduce

  1. Install diun as service (i.e. systemd)
  2. Run it with a user whom home is a not existent folder (i.e. /dev/null or /bin/false)

Diun version

v4.28.0

Docker info

Version:    27.3.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.17.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.7
    Path:     /usr/libexec/docker/cli-plugins/docker-compose


### Docker Compose config

_No response_

### Logs

```text
n/a

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions