-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·57 lines (42 loc) · 1.55 KB
/
install.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env bash
rm -rf /tmp/dockerizer
echo "Installing dockerizer"
git clone https://github.com/frontid/dockerizer.git /tmp/dockerizer
echo "------------------------"
echo "Installing..."
echo "------------------------"
docker_compose_plugin=$(docker compose version)
if [ $? = 1 ]; then
echo -e "${BRed}Please install docker compose plugin and try again: https://docs.docker.com/compose/install/linux/${Color_Off}"
exit 1
fi
echo -e "Installing smartcd"
# Install smartcd if not installed.
if [ ! -f "$HOME/.smartcd_config" ]; then
curl -L https://raw.githubusercontent.com/cxreg/smartcd/master/download-and-install | bash
else
echo -e "\e[32mCurrently installed\e[0m"
fi
echo ""
echo -e "Creating a traefik docker network"
network_exist="$(docker network ls | grep traefik_default)"
if [ -z "$network_exist" ]; then
docker network create traefik_default
else
echo -e "\e[32mTraefik docker network currently installed\e[0m"
fi
echo ""
echo -e "Installing/updating traefik dockerizer proxy"
traefik_path="/usr/local/bin/dk_traefik"
sudo mkdir -p $traefik_path
sudo cp /tmp/dockerizer/setup_files/traefik-docker-compose.yml "$traefik_path/docker-compose.yml"
sudo cp -R /tmp/dockerizer/setup_files/traefik $traefik_path
# ---------
echo ""
echo -e "Installing/updating dk cli"
sudo cp /tmp/dockerizer/setup_files/dockerizer_cli.sh /usr/local/bin/dk
sudo cp /tmp/dockerizer/setup_files/dockerizer_cli_bash_autocomplete /etc/bash_completion.d/dk
sudo chmod +x /usr/local/bin/dk
# ---------
echo ''
echo -e "\e[32m---- Everything installed! ----\e[0m"