This commit is contained in:
陆柯 2022-07-01 17:25:51 +08:00
parent 8df479e7a1
commit 746970f1ff
2 changed files with 15 additions and 1 deletions

View File

@ -2,6 +2,9 @@
# https://docs.docker.com/engine/install/debian/
# 安装自带版本 apt install docker.io && apt install docker-compose
echo "=== Choose docker source (a: 阿里云, z: 中科大, leave blank for default):"
read -p ">>> " DOCKER_SOURCE
if [ $DOCKER_SOURCE = 'a' ]
@ -42,7 +45,7 @@ echo "=== 配置中国加速镜像源 /etc/docker/daemon.json (d: Docker中国,
read -p ">>> " DOCKER_MIRROR
if [ ! $DOCKER_MIRROR ]
then
echo "--- Docker mirror is not specified. Exit now."
echo "--- Docker mirror is not specified."
elif [ $DOCKER_MIRROR = 'd' ]
then
DOCKER_MIRROR=https://registry.docker-cn.com
@ -62,3 +65,13 @@ then
echo " ]" | sudo tee -a /etc/docker/daemon.json > /dev/null
echo "}" | sudo tee -a /etc/docker/daemon.json > /dev/null
fi
echo "=== 启动docker服务y for yes, anything else for no"
read -p ">>> " StartDockerDaemon
if [ $StartDockerDaemon ] && [ $StartDockerDaemon = 'y' ]
then
# 开机启动
sudo systemctl enable docker
# 当前启动
sudo systemctl start docker
fi

1
init-shell.sh Normal file
View File

@ -0,0 +1 @@
curl -sSL https://git.faronear.org/npm/sysconfig/raw/branch/main/nixhome/.bashrc > ~/.bashrc