Skip to content

Commit ace78ad

Browse files
committed
Try printing netstat in background.
1 parent e414b7c commit ace78ad

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

deploy/tasks/buildah-oci-ta.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,19 @@ spec:
393393
BUILDAH_ARGS=()
394394
use_domain_proxy=false
395395
396+
cat >> /app/capture-netstat.sh << EOF
397+
#!/bin/bash
398+
while true; do
399+
date >> /app/netstat-output.txt
400+
netstat -a >> /app/netstat-output.txt
401+
echo "--------------------------------------" >> /app/netstat-output.txt
402+
sleep 30
403+
done
404+
EOF
405+
406+
chmod +x /app/capture-netstat.sh
407+
nohup /app/capture-netstat.sh &
408+
396409
if [ "${HERMETIC}" == "true" ]; then
397410
BUILDAH_ARGS+=("--pull=never")
398411
UNSHARE_ARGS="--net"
@@ -405,7 +418,6 @@ spec:
405418
echo "Build will be executed with domain proxy"
406419
/app/domain-proxy-server-runner &
407420
server_pid=$!
408-
netstat -a
409421
fi
410422
fi
411423
@@ -544,7 +556,7 @@ spec:
544556
-f "$dockerfile_copy" -t "$IMAGE" .
545557
fi
546558
547-
netstat -a
559+
cat /app/netstat-output.txt
548560
549561
container=$(buildah from --pull-never "$IMAGE")
550562
buildah mount $container | tee /shared/container_path

0 commit comments

Comments
 (0)