Merge pull request #9090 from GabyCT/topic/pulldockerimage

gha: docker: Pull docker image as part of the dependencies
This commit is contained in:
Chelsea Mafrica 2024-02-20 14:28:53 -08:00 committed by GitHub
commit 241a56989a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,11 +12,14 @@ set -o pipefail
kata_tarball_dir="${2:-kata-artifacts}"
docker_dir="$(dirname "$(readlink -f "$0")")"
source "${docker_dir}/../../common.bash"
image="${image:-instrumentisto/nmap:latest}"
function install_dependencies() {
info "Installing the dependencies needed for running the docker smoke test"
install_docker
sudo -E docker pull "${image}"
}
function run() {
@ -25,10 +28,10 @@ function run() {
enabling_hypervisor
info "Running docker with runc"
sudo docker run --rm --entrypoint nping instrumentisto/nmap --tcp-connect -c 2 -p 80 www.github.com
sudo docker run --rm --entrypoint nping "${image}" --tcp-connect -c 2 -p 80 www.github.com
info "Running docker with Kata Containers (${KATA_HYPERVISOR})"
sudo docker run --rm --runtime io.containerd.kata-${KATA_HYPERVISOR}.v2 --entrypoint nping instrumentisto/nmap --tcp-connect -c 2 -p 80 www.github.com
sudo docker run --rm --runtime io.containerd.kata-${KATA_HYPERVISOR}.v2 --entrypoint nping "${image}" --tcp-connect -c 2 -p 80 www.github.com
}
function main() {