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

Bug rfc1918 correction #321

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM debian:bullseye-slim

RUN apt-get update \
&& apt-get -y --quiet --force-yes upgrade \
&& apt-get install -y --no-install-recommends ca-certificates gcc g++ make build-essential cmake git autoconf automake curl libtool libtool-bin libssl-dev libcurl4-openssl-dev zlib1g-dev libgoogle-perftools-dev \
&& apt-get install -y --no-install-recommends ca-certificates gcc g++ make build-essential cmake git autoconf automake curl libtool libtool-bin libssl-dev libcurl4-openssl-dev zlib1g-dev libgoogle-perftools-dev iproute2 \
&& git clone --depth=50 --branch=main https://github.com/drachtio/drachtio-server.git /usr/local/src/drachtio-server \
&& cd /usr/local/src/drachtio-server \
&& git submodule update --init --recursive \
Expand Down
9 changes: 8 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ case $CLOUD in
;;
esac

if [ -f "/proc/1/cgroup" ]; then
tinpotnick marked this conversation as resolved.
Show resolved Hide resolved
# Docker container
LOCAL_IP=$(ip route get 1.1.1.1 | grep -oP 'src \K\S+')
fi

if [ "$1" = 'drachtio' ]; then
shift

Expand All @@ -58,7 +63,9 @@ if [ "$1" = 'drachtio' ]; then
;;

*)
MYARGS+=($1)
thisarg="${1//PUBLIC_IP/"$PUBLIC_IP"}"
thisarg="${thisarg//LOCAL_IP/"$LOCAL_IP"}"
MYARGS+=($thisarg)
;;
esac

Expand Down