[feature] add kubectl for ubuntu
This commit is contained in:
parent
3a96b49899
commit
f1a6485f7b
|
@ -10,6 +10,7 @@ case "$PM" in
|
||||||
sudo apt install -y docker.io docker-compose
|
sudo apt install -y docker.io docker-compose
|
||||||
! which pip3 && $ROOT/python/install.sh
|
! which pip3 && $ROOT/python/install.sh
|
||||||
sudo pip3 install docker-compose
|
sudo pip3 install docker-compose
|
||||||
|
sudo snap install kubectl --classic
|
||||||
;;
|
;;
|
||||||
pacman)
|
pacman)
|
||||||
sudo pacman -S --needed docker docker-compose
|
sudo pacman -S --needed docker docker-compose
|
||||||
|
@ -24,8 +25,8 @@ sudo systemctl start docker
|
||||||
# configuration
|
# configuration
|
||||||
sudo usermod -aG docker $USER
|
sudo usermod -aG docker $USER
|
||||||
|
|
||||||
if [ -d /etc/docker ]; then
|
# set mirror
|
||||||
dj='{}'
|
if in-china && [[ -d /etc/docker ]]; then
|
||||||
if [ -f /etc/docker/daemon.json ]; then
|
if [ -f /etc/docker/daemon.json ]; then
|
||||||
# backup
|
# backup
|
||||||
[ ! -f /etc/docker/daemon.bak.json ] && \
|
[ ! -f /etc/docker/daemon.bak.json ] && \
|
||||||
|
@ -33,6 +34,8 @@ if [ -d /etc/docker ]; then
|
||||||
# read
|
# read
|
||||||
dj=$(cat /etc/docker/daemon.json)
|
dj=$(cat /etc/docker/daemon.json)
|
||||||
fi
|
fi
|
||||||
echo $dj | jq '. + {"registry-mirrors": ["https://izuhlbap.mirror.aliyuncs.com"]}' | sudo tee /etc/docker/daemon.json
|
[[ -z $dj ]] && dj='{}'
|
||||||
|
echo $dj | jq '. + {"registry-mirrors": ["https://izuhlbap.mirror.aliyuncs.com"]}' | \
|
||||||
|
sudo tee /etc/docker/daemon.json
|
||||||
sudo systemctl restart docker
|
sudo systemctl restart docker
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user