Skip to content

Commit

Permalink
fix(setcap) only setcap if KONG_STREAM_LISTEN env is set
Browse files Browse the repository at this point in the history
  • Loading branch information
hutchic committed Dec 21, 2018
1 parent 84a2213 commit 89ec970
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ if [[ "$1" == "kong" ]]; then
chown kong "$PREFIX"
su-exec kong kong prepare -p "$PREFIX"

setcap cap_net_raw=+ep /usr/local/openresty/nginx/sbin/nginx
if [ ! -z ${KONG_STREAM_LISTEN+x} ]; then
setcap cap_net_raw=+ep /usr/local/openresty/nginx/sbin/nginx
fi

chmod 777 /proc/self/fd/1
chmod 777 /proc/self/fd/2
Expand Down
4 changes: 3 additions & 1 deletion centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ if [[ "$1" == "kong" ]]; then
chown kong "$PREFIX"
su kong -c "kong prepare -p '$PREFIX'"

setcap cap_net_raw=+ep /usr/local/openresty/nginx/sbin/nginx
if [ ! -z ${KONG_STREAM_LISTEN+x} ]; then
setcap cap_net_raw=+ep /usr/local/openresty/nginx/sbin/nginx
fi

chmod 777 /proc/self/fd/1
chmod 777 /proc/self/fd/2
Expand Down

0 comments on commit 89ec970

Please sign in to comment.