代码拉取完成,页面将自动刷新
同步操作将从 no-src/gofs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env bash
# usage
# build the latest image
# ./scripts/build-docker.sh
# build the image with a specified tag
# ./scripts/build-docker.sh v0.8.0
echo "current branch is $(git branch --show-current)"
# update git repository
# git pull --no-rebase
# update the latest golang image
docker pull golang:latest
# set GOPROXY environment variable
# GOPROXY=https://goproxy.cn
SOFT_NAME=gofs
# docker image name
SOFT_IMAGE_NAME=nosrc/${SOFT_NAME}
# docker image tag
SOFT_IMAGE_TAG=latest
# reset SOFT_IMAGE_TAG to the value of the first parameter provided by the user
if [ -n "$1" ]; then
SOFT_IMAGE_TAG=$1
fi
# remove the existing old image
docker rmi -f $SOFT_IMAGE_NAME:$SOFT_IMAGE_TAG
# build Dockerfile
docker build --build-arg GOPROXY=$GOPROXY -t $SOFT_IMAGE_NAME:$SOFT_IMAGE_TAG .
# remove dangling images
docker image prune -f
docker images | grep ${SOFT_NAME}
# run a container to print the soft version
docker run --rm --name running-${SOFT_NAME}-version $SOFT_IMAGE_NAME:$SOFT_IMAGE_TAG ${SOFT_NAME} -v
# push the image to the DockerHub
# docker push $SOFT_IMAGE_NAME:$SOFT_IMAGE_TAG
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。