forked from mrevjd/cockpit-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·34 lines (25 loc) · 867 Bytes
/
install
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
33
34
#!/bin/bash
# Check for dependencies
command -v docker >/dev/null 2>&1 || { echo >&2 "I require docker but it's not installed. Aborting."; exit 1; }
command -v cockpit-bridge >/dev/null 2>&1 || { echo >&2 "I require cockpit but it's not installed. Aborting."; exit 1; }
# Build
docker build -t cockpit-docker .
# Remove container if exists
docker rm -f cockpit-docker
# Remove old build
rm -rf ./dist ; mkdir ./dist
# Prep build folder
mkdir -p $PWD/dist/docker
# Build
docker run -it \
-v $PWD:/app \
--name cockpit-docker \
cockpit-docker
# Remove user module dir
rm -rf $HOME/.local/share/cockpit/docker
# Link as user module
rm $PWD/dist/docker/*test*
mkdir -p ~/.local/share/cockpit
ln -snf $PWD/dist/docker $HOME/.local/share/cockpit/docker
echo "===> List of packages, if all went fine this list should container docker"
cockpit-bridge --packages