-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default API IP to all interfaces in the docker image
Otherwise, the API isn't accessible even when ports are forwarded without manually requesting `--api-ip` An entrypoint wrapper is used so that only the default behavior is changed, but `--api-ip` can still be passed to the command.
- Loading branch information
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
# Wrapper around CHP entrypoint that changes defaults slightly | ||
# to be more appropriate when run in a container. | ||
|
||
if [[ "$@" != *"--api-ip"* ]]; then | ||
# Default api-ip to all interfaces in docker, | ||
# so that it is accessible to other containers | ||
# and when port-forwarding is requested. | ||
ARGS="--api-ip=0.0.0.0" | ||
fi | ||
|
||
exec configurable-http-proxy $ARGS $@ |