<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
#!/usr/bin/env bash
set -eo pipefail

SELFDIR=$(dirname "$0")
SELFDIR=$(cd "$SELFDIR" && pwd)
PASSENGER_ROOT=$(cd "$SELFDIR/../.." && pwd)
# shellcheck source=lib/functions.sh
source "$SELFDIR/lib/functions.sh"
cd "$PASSENGER_ROOT"

autodetect_environment
sanity_check_environment
echo

if [[ "$OS" != linux ]]; then
	echo "ERROR: this script can only be run on Linux." >&2
	exit 1
fi

if tty -s; then
	TTY_ARGS='-t -i'
else
	TTY_ARGS=
fi

run_exec docker run --rm $TTY_ARGS \
	-v "$PASSENGER_ROOT:/passenger" \
	-v "$CACHE_DIR:/passenger/.ci_cache" \
	-e "APP_UID=$(id -u)" \
	-e "APP_GID=$(id -g)" \
	-e "DEBUG_CONSOLE=$DEBUG_CONSOLE" \
	-e "TEST_RUBY_VERSION=$TEST_RUBY_VERSION" \
	-e "COMPILE_CONCURRENCY=$COMPILE_CONCURRENCY" \
	-e "SUDO=$SUDO" \
	phusion/passenger-ci-docker-env:2.0.6 \
	/sbin/my_init --skip-runit --skip-startup-files --quiet -- \
	/passenger/dev/ci/scripts/inituidgid \
	/sbin/setuser app \
	/bin/bash -lc 'cd /passenger && exec "$@"' \
	./dev/ci/scripts/docker-entrypoint.sh \
	./dev/ci/scripts/docker-entrypoint.sh \
	"$@"
