代码拉取完成,页面将自动刷新
同步操作将从 cambriconknight/dev-env-ubuntu 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
set -e
# -------------------------------------------------------------------------------
# Filename: load-image-ubuntu-dev.sh
# UpdateDate: 2021/09/27
# Description: Loading docker image for IDE.
# Example:
# ./load-image-ubuntu-dev.sh
# ./load-image-ubuntu-dev.sh 16.04
# ./load-image-ubuntu-dev.sh 18.04
# Depends: image-$OS-$PATH_WORK-$VERSION.tar.gz
# Notes:
# -------------------------------------------------------------------------------
#Dockerfile(16.04/18.04/CentOS)
OSVer="16.04"
if [[ $# -ne 0 ]];then OSVer="${1}";fi
# Source env
source ./env.sh $OSVer
#################### main ####################
# 0.Check param
#if [[ $# -eq 0 ]];then
# echo -e "${yellow}WARNING: Load images(${FULLNAME_IMAGE}) by default. ${none}"
#else
# FULLNAME_IMAGE="${1}"
#fi
# 0.Check File Images
if [[ ! -f ${FULLNAME_IMAGE} ]]; then
echo -e "${red}ERROR: Images(${FULLNAME_IMAGE}) does not exist! ${none}" && exit -1
fi
if [[ ! ${FULLNAME_IMAGE} =~ ${FILENAME_IMAGE} ]]; then
echo -e "${red}ERROR: Images(${FULLNAME_IMAGE}), please use images(fileName:${FILENAME_IMAGE})! ${none}" && exit -1
fi
# 0.Check Docker Images
num=`sudo docker images | grep -w "$MY_IMAGE" | grep -w "$VERSION" | wc -l`
echo $num
echo $NAME_IMAGE
# 1.Load Docker Images
if [ 0 -eq $num ];then
echo "The image($NAME_IMAGE) is not loaded and is loading......"
#load image
sudo docker load < ${FULLNAME_IMAGE}
else
echo "The image($NAME_IMAGE) is already loaded!"
fi
#echo "All image information:"
#sudo docker images
echo "The image($NAME_IMAGE) information:"
sudo docker images | grep -e "REPOSITORY" -e $MY_IMAGE
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。