1
0
mirror of https://github.com/containers/youki synced 2024-11-22 17:02:00 +01:00
youki/tests/dind/run.sh
Jorge Prendes 3f08ae7167
add docker-in-docker e2e test (#2645)
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
2024-01-20 10:16:08 +09:00

21 lines
492 B
Bash
Executable File

#!/bin/bash
set -e
ROOT=$(git rev-parse --show-toplevel)
docker run --privileged -dq \
--name youki-test-dind \
-v $ROOT/youki:/usr/bin/youki \
-v $ROOT/tests/dind/daemon.json:/etc/docker/daemon.json \
docker:dind > /dev/null
trap "docker rm -f youki-test-dind > /dev/null" EXIT
# wait for docker to start
timeout 30s \
grep -q -m1 "/var/run/docker.sock" \
<(docker logs -f youki-test-dind 2>&1)
docker exec -i youki-test-dind \
docker run -q --runtime=youki hello-world