aboutsummaryrefslogtreecommitdiff
path: root/full_test_with_podman.sh
blob: 517175efa60cd68f2b00792c9da8207eab9727d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

if [ ! -z $1 ] && [ -n "$1" ]
then
    tag="$(bash ./test_with_podman.sh "$1" | tail -n 2 | head -n 1 | cut -d ' ' -f 3)"
    name="$(echo -n $tag | cut -d ':' -f 1 | cut -d '/' -f 2)"
    container="akt-test-$name"
    podman run --name $container -d -p 8620:8610 --cap-add=NET_ADMIN --device /dev/net/tun $tag
    podman exec -it $container bash
    podman container stop $container
    podman container rm $container
else
    echo "Provide one of the following distros as an argument to work with"
    find podman -type f | sed -e 's/^podman\/ContainerFile\./* /g'
fi