@@ -33,7 +33,12 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
3333
3434 # the name isn't important, so long as we use the same UID
3535 LOCAL_USER=nonroot
36- ${CI_RETRY_EXE} docker pull " $CI_IMAGE_NAME_TAG "
36+ DOCKER_BUILDKIT=1 ${CI_RETRY_EXE} docker build \
37+ --file " ${BASE_ROOT_DIR} /ci/test_imagefile" \
38+ --build-arg " CI_IMAGE_NAME_TAG=${CI_IMAGE_NAME_TAG} " \
39+ --build-arg " FILE_ENV=${FILE_ENV} " \
40+ --tag=" ${CONTAINER_NAME} " \
41+ " ${BASE_ROOT_DIR} "
3742
3843 if [ -n " ${RESTART_CI_DOCKER_BEFORE_RUN} " ] ; then
3944 echo " Restart docker before run to stop and clear all containers started with --rm"
@@ -49,7 +54,7 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
4954 -w $BASE_ROOT_DIR \
5055 --env-file /tmp/env \
5156 --name $CONTAINER_NAME \
52- $CI_IMAGE_NAME_TAG )
57+ $CONTAINER_NAME )
5358 export CI_CONTAINER_ID
5459
5560 # Create a non-root user inside the container which matches the local user.
@@ -63,6 +68,7 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
6368 export CI_EXEC_CMD_PREFIX=" docker exec -u $LOCAL_UID $CI_CONTAINER_ID "
6469else
6570 echo " Running on host system without docker wrapper"
71+ " ${BASE_ROOT_DIR} /ci/test/01_base_install.sh"
6672fi
6773
6874CI_EXEC () {
@@ -76,29 +82,6 @@ export -f CI_EXEC_ROOT
7682
7783CI_EXEC mkdir -p " ${BINS_SCRATCH_DIR} "
7884
79- if [ -n " $DPKG_ADD_ARCH " ]; then
80- CI_EXEC_ROOT dpkg --add-architecture " $DPKG_ADD_ARCH "
81- fi
82-
83- if [[ $CI_IMAGE_NAME_TAG == * centos* ]]; then
84- ${CI_RETRY_EXE} CI_EXEC_ROOT dnf -y install epel-release
85- ${CI_RETRY_EXE} CI_EXEC_ROOT dnf -y --allowerasing install " $CI_BASE_PACKAGES " " $PACKAGES "
86- elif [ " $CI_USE_APT_INSTALL " != " no" ]; then
87- if [[ " ${ADD_UNTRUSTED_BPFCC_PPA} " == " true" ]]; then
88- # Ubuntu 22.04 LTS and Debian 11 both have an outdated bpfcc-tools packages.
89- # The iovisor PPA is outdated as well. The next Ubuntu and Debian releases will contain updated
90- # packages. Meanwhile, use an untrusted PPA to install an up-to-date version of the bpfcc-tools
91- # package.
92- # TODO: drop this once we can use newer images in GCE
93- CI_EXEC_ROOT add-apt-repository ppa:hadret/bpfcc
94- fi
95- if [[ -n " ${APPEND_APT_SOURCES_LIST} " ]]; then
96- CI_EXEC_ROOT echo " ${APPEND_APT_SOURCES_LIST} " \>\> /etc/apt/sources.list
97- fi
98- ${CI_RETRY_EXE} CI_EXEC_ROOT apt-get update
99- ${CI_RETRY_EXE} CI_EXEC_ROOT apt-get install --no-install-recommends --no-upgrade -y " $PACKAGES " " $CI_BASE_PACKAGES "
100- fi
101-
10285if [ -n " $PIP_PACKAGES " ]; then
10386 if [ " $CI_OS_NAME " == " macos" ]; then
10487 sudo -H pip3 install --upgrade pip
0 commit comments