Added testers

This commit is contained in:
2021-10-06 10:42:09 +02:00
parent abb1e1aa71
commit 80e9925cc9
2 changed files with 19 additions and 2 deletions

17
.local/bin/tester-ubuntu Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
docker stop "$(docker ps --all | grep -i ubuntu | awk '{print $1}')" > /dev/null
docker rm "$(docker ps --all | grep -i ubuntu | awk '{print $1}')" > /dev/null
docker pull jrei/systemd-ubuntu:latest
docker run \
-d \
-v $HOME/git/dev:/opt \
--tmpfs /tmp \
--tmpfs /run \
--tmpfs /run/lock \
--privileged \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
jrei/systemd-ubuntu
container="$(docker ps --all | grep -i ubuntu | awk '{print $1}')"
sleep 15 && docker exec -it "$container" /bin/bash
docker stop "$container"
docker rm "$container"