Skip to content

entrypoint exits 0 when /data is not writeable #40

@mhrivnak

Description

@mhrivnak

If you run the container but provide a /data that can't be written to, such as for permission issues, the entrypoint script just exits with code 0. It should exit with a non-zero code to make it clear that a problem was encountered, and it should not continue the script past a step that failed.

[mhrivnak@localhost ]$ podman run --rm -it -v /:/data ghcr.io/oxtyped/gpodder2go:main
No database found, intializing gpodder2go ...
2024/12/12 13:33:00 unable to open database file: out of memory (14)
... database initialized
VERIFIER_SECRET_KEY not found, intializing VERIFIER_SECRET_KEY ...
/entrypoint.sh: line 9: /data/VERIFIER_SECRET_KEY: Permission denied
... VERIFIER_SECRET_KEY initialized
cat: /data/VERIFIER_SECRET_KEY: No such file or directory
VERIFIER_SECRET_KEY is missing
[mhrivnak@localhost ]$ echo $?
0

Eagle-eyed readers may also notice the incorrect out of memory (14) message, but that appears to be coming from the sqlite3 driver.

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