Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ MODE="${CRATEDOCS_MODE:-http}"
ADDRESS="${CRATEDOCS_ADDRESS:-0.0.0.0:8080}"
DEBUG="${CRATEDOCS_DEBUG:-false}"

if [ "$MODE" = "http" ]; then
if [ "$DEBUG" = "true" ]; then
exec /usr/local/bin/cratedocs http --address "$ADDRESS" --debug "$@"
else
exec /usr/local/bin/cratedocs http --address "$ADDRESS" "$@"
fi
else
exec /usr/local/bin/cratedocs "$MODE" "$@"
fi
# If explicit args provided, run with those
if [ "$#" -gt 0 ]; then
exec /usr/local/bin/cratedocs "$@"
Comment on lines 8 to 10
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the new "explicit args" branch, running the container as docker run … <image> http will now execute cratedocs http directly and bypass the entrypoint’s container-specific defaults (CRATEDOCS_ADDRESS and CRATEDOCS_DEBUG). Since the CLI default for http --address is 127.0.0.1:8080, this can make the server bind localhost inside the container and appear unreachable from the host. Consider special-casing the http subcommand to inject --address "$ADDRESS" (and --debug when CRATEDOCS_DEBUG=true) unless the user already supplied those flags, or otherwise make the expected invocation explicit (must pass full args including --address 0.0.0.0:…).

Copilot uses AI. Check for mistakes.
Expand Down