2021-10-06 10:42:09 +02:00
|
|
|
#!/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
|
2021-10-17 21:04:53 +02:00
|
|
|
docker stop "$container" > /dev/null
|
|
|
|
docker rm "$container" > /dev/null
|