Skip to content

Docker container fails to start without config.json #58

@orrious

Description

@orrious

Without config.json:
1.) Docker container fails to start
2.) Logging does NOT show the reason the container failed to start.

Please add logic to:
1.) Provide logging showing that config.json doesn't exist.
2.) Create config.json with the defaults.

Change your current entrypoint in dockerfile to a CMD and add entrypoint.sh as your entrypoint. This will run entrypoint.sh and then the CMD when the container starts. It's a nice way to inject an init script of sorts.

entrypoint.sh

if [ ! -e /app/config.json ] 
then
    echo "config.json didn't exist, creating one!" 
    cp /app/defaultConfig.json /app/config.json 
fi

exec "$@"

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