Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entrypoint exits 0 when /data is not writeable #40

Open
mhrivnak opened this issue Dec 12, 2024 · 0 comments · May be fixed by #41
Open

entrypoint exits 0 when /data is not writeable #40

mhrivnak opened this issue Dec 12, 2024 · 0 comments · May be fixed by #41

Comments

@mhrivnak
Copy link

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.

mhrivnak added a commit to mhrivnak/gpodder2go that referenced this issue Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant