Skip to content

Unintended Container Restart Preventing Custom Startup Command Execution #2

@vedantpatel1997

Description

@vedantpatel1997

Issue Overview:
In the default container startup script located at /opt/startup/init_container.sh, the line service nginx restart triggers a restart of the Nginx service before the custom startup command is executed. This unintended behavior leads to the container entering a restart loop, preventing the custom startup command from ever executing successfully.

Root Cause Analysis:
The script’s current logic first restarts Nginx using the command service nginx restart. (This can be changed to reload instead of restart)
This action causes the container to restart prematurely, interrupting the execution flow.
As a result, the container fails to proceed to the subsequent exec "$@" command, which is intended to execute the user-defined startup command.

Impact:
Custom startup commands never execute, rendering the container unable to perform intended operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions