forked from a13xp0p0v/kernel-build-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rm_containers.sh
executable file
·32 lines (28 loc) · 1.02 KB
/
rm_containers.sh
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
29
30
31
32
#!/bin/bash
groups | grep docker
NEED_SUDO=$?
if [ $NEED_SUDO -eq 1 ]; then
echo "Hey, we gonna use sudo for running docker"
SUDO_CMD="sudo"
else
echo "Hey, you are in docker group, sudo is not needed"
SUDO_CMD=""
fi
set -x
#$SUDO_CMD docker rm `sudo docker ps -a -q`
$SUDO_CMD docker rmi kernel-build-container:gcc-4.9
$SUDO_CMD docker rmi kernel-build-container:gcc-5
$SUDO_CMD docker rmi kernel-build-container:gcc-6
$SUDO_CMD docker rmi kernel-build-container:gcc-7
$SUDO_CMD docker rmi kernel-build-container:gcc-8
$SUDO_CMD docker rmi kernel-build-container:gcc-9
$SUDO_CMD docker rmi kernel-build-container:gcc-10
$SUDO_CMD docker rmi kernel-build-container:gcc-11
$SUDO_CMD docker rmi kernel-build-container:gcc-12
$SUDO_CMD docker rmi kernel-build-container:gcc-13
$SUDO_CMD docker rmi kernel-build-container:clang-12
$SUDO_CMD docker rmi kernel-build-container:clang-13
$SUDO_CMD docker rmi kernel-build-container:clang-14
$SUDO_CMD docker rmi kernel-build-container:clang-15
$SUDO_CMD docker ps -a
$SUDO_CMD docker image ls