-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathci_docker
More file actions
executable file
·28 lines (25 loc) · 882 Bytes
/
ci_docker
File metadata and controls
executable file
·28 lines (25 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
: ${IMAGE:="nmstate/centos8-nmstate-dev"}
NAME="centos8-nmstate"
if [ "CHK$1" == "CHK1" ];then
IMAGE="nmstate/fedora-nmstate-dev"
NAME="fedora-nmstate"
fi
CONTAINER_ID=`
sudo podman run --systemd=true --privileged -d \
--hostname $NAME \
-v /home/fge/Source/nmstate:/home/fge/Source/nmstate \
$IMAGE `
sudo podman exec -i $CONTAINER_ID \
/bin/bash -c \
'while ! systemctl is-active dbus; do sleep 1; done'
sudo podman exec -i $CONTAINER_ID \
/bin/bash -c \
'systemctl start systemd-udevd;
while ! systemctl is-active systemd-udevd; do sleep 1; done'
sudo podman exec -i $CONTAINER_ID \
/bin/bash -c \
'systemctl restart NetworkManager;
while ! systemctl is-active NetworkManager; do sleep 1; done'
sudo podman exec -it $CONTAINER_ID /bin/bash
sudo podman rm $CONTAINER_ID -f