Skip to content

Commit

Permalink
Merge pull request #9090 from GabyCT/topic/pulldockerimage
Browse files Browse the repository at this point in the history
gha: docker: Pull docker image as part of the dependencies
  • Loading branch information
cmaf committed Feb 20, 2024
2 parents ea78013 + 598c774 commit 241a569
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/integration/docker/gha-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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() {
Expand Down

0 comments on commit 241a569

Please sign in to comment.