diff --git a/scripts/run-docker.sh b/scripts/run-docker.sh index 19460171c..d4a93883d 100755 --- a/scripts/run-docker.sh +++ b/scripts/run-docker.sh @@ -31,8 +31,15 @@ else fi $SUDO docker start $CONTAINER_NAME >/dev/null 2>&1 || { + if [ "$GITHUB_ACTIONS" = "true" ]; then + SECURITY_OPT="--cap-add SYS_ADMIN --cap-add NET_ADMIN --security-opt apparmor:unconfined --security-opt seccomp=unconfined" + else + SECURITY_OPT="" + fi + echo "Creating new container..." $SUDO docker run \ + $SECURITY_OPT \ --detach \ --name $CONTAINER_NAME \ --volume $REPOROOT:$CONTAINER_HOME_DIR/termux-packages \ @@ -49,6 +56,10 @@ $SUDO docker start $CONTAINER_NAME >/dev/null 2>&1 || { fi } +if [ "$GITHUB_ACTIONS" = "true" ]; then + $SUDO docker exec $DOCKER_TTY $CONTAINER_NAME sudo ethtool -K eth0 tx off rx off +fi + if [ "$#" -eq "0" ]; then $SUDO docker exec --interactive $DOCKER_TTY $CONTAINER_NAME bash else diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index 6cf03781a..989a96445 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -3,6 +3,9 @@ set -e -u PACKAGES="" +# For fixing networking interface when running on Github Actions. +PACKAGES+=" ethtool" + # For en_US.UTF-8 locale. PACKAGES+=" locales"