File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,7 +120,17 @@ log_info "Step 4: Injecting ${DELAY_MS}ms network delay to $POSTGRES_CONTAINER..
120120
121121if ! docker exec " $POSTGRES_CONTAINER " sh -c " command -v tc" 2> /dev/null; then
122122 log_info " Installing iproute2..."
123- docker exec " $POSTGRES_CONTAINER " apk add -q iproute2 2> /dev/null || true
123+ docker exec " $POSTGRES_CONTAINER " sh -c "
124+ if command -v apk >/dev/null 2>&1; then
125+ apk add -q iproute2 2>/dev/null || true
126+ elif command -v apt-get >/dev/null 2>&1; then
127+ apt-get update -qq && apt-get install -y -qq iproute2 2>/dev/null || true
128+ elif command -v yum >/dev/null 2>&1; then
129+ yum install -y -q iproute 2>/dev/null || true
130+ elif command -v dnf >/dev/null 2>&1; then
131+ dnf install -y -q iproute 2>/dev/null || true
132+ fi
133+ " || true
124134fi
125135
126136INJECT_RESULT=$( docker exec " $POSTGRES_CONTAINER " sh -c "
You can’t perform that action at this time.
0 commit comments