Skip to content

job-run does not work with a docker image created from scratch: unable to find user root: no matching entries in passwd file #333

@fmontorsi-equinix

Description

@fmontorsi-equinix

Hi,
I'm new to Ofelia so this is my first attempt to use it.
But it's really nice software, thanks!

So here's my attempt: here's my ofelia.ini

[job-local "heartbeat"]
schedule = @hourly
command = date

[job-run "backup-data"]
schedule = @every 5s
image = ghcr.io/rustic-rs/rustic:v0.9.5
hostname = "mastermind"
command = "rustic backup /mnt/tnas-data"
volume = "/home/rustic/rustic-data.toml:/etc/rustic/rustic.toml:ro"
volume = "data_nas:/mnt/tnas-data:ro"

and I start Ofelia with this docker-compose.yml:

services:
  ofelia:
    image: mcuadros/ofelia:latest
    command: daemon --config=/etc/ofelia.ini
    volumes:
      - ./ofelia.ini:/etc/ofelia.ini:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro

volumes:
  data_nas:
     ....removed for privacy...

What I get is:

ofelia-1  | 2025-02-28T23:07:04.014Z  scheduler.go:44 ▶ NOTICE New job registered "backup-data" - "rustic backup /mnt/tnas-data" - "@every 5s"
ofelia-1  | 2025-02-28T23:07:04.014Z  scheduler.go:44 ▶ NOTICE New job registered "heartbeat" - "date" - "@hourly"
ofelia-1  | 2025-02-28T23:07:04.015Z  scheduler.go:55 ▶ DEBUG Starting scheduler with 2 jobs
ofelia-1  | 2025-02-28T23:07:09.005Z  common.go:125 ▶ NOTICE [Job "backup-data" (fc51d2d7e0fd)] Started - rustic backup /mnt/tnas-data
ofelia-1  | 2025-02-28T23:07:09.73Z  common.go:125 ▶ NOTICE [Job "backup-data" (fc51d2d7e0fd)] Pulled image ghcr.io/rustic-rs/rustic:v0.9.5
ofelia-1  | 2025-02-28T23:07:09.966Z  common.go:121 ▶ ERROR [Job "backup-data" (fc51d2d7e0fd)] Finished in "960.690499ms", failed: true, skipped: false, error: API error (500): unable to find user root: no matching entries in passwd file

and the error "unable to find user root" is repeated forever every 5sec.

My guess is that the ghcr.io/rustic-rs/rustic:v0.9.5 indeed contains to passwd file, since it was built from scratch.
Is there a way to make Ofelia happy to run this container regardless of the absence of passwd file?

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions