Skip to content

Commit

Permalink
Set cap_net_bind_service on node.
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Jul 26, 2024
1 parent 7faa560 commit 2939607
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ NPM_RC="/usr/share/nodejs/npm/npmrc"

apt-get -y --no-install-recommends update -qq
apt-get -y --no-install-recommends install python-is-python3 python3-pip npm \
${DEV_PKGS}
libcap2-bin ${DEV_PKGS}

python3 -m pip install --break-system-packages -U -r requirements.txt
npm install -g http-server

echo "logs-max=0" >> /usr/share/nodejs/npm/npmrc
echo "update-notifier=0" >> /usr/share/nodejs/npm/npmrc
echo "cache=/tmp/.npm_cache" >> /usr/share/nodejs/npm/npmrc
setcap 'cap_net_bind_service=+ep' /usr/bin/node

apt-get -y remove --purge ${DEV_PKGS}
apt-get -y autoremove --purge
Expand Down

0 comments on commit 2939607

Please sign in to comment.