1 Star 0 Fork 0

nmgliangwei/distribution-library-image

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
update.sh 831 Bytes
一键复制 编辑 原始数据 按行查看 历史
Aaron Lehmann 提交于 2015-07-29 10:04 . Add library image for registry
#!/bin/bash
set -e
if [ $# -eq 0 ] ; then
echo "Usage: ./update.sh <docker/distribution tag or branch>"
exit
fi
VERSION=$1
# cd to the current directory so the script can be run from anywhere.
cd `dirname $0`
echo "Fetching and building distribution $VERSION..."
# Create a temporary directory.
TEMP=`mktemp -d /$TMPDIR/distribution.XXXXXX`
git clone -b $VERSION https://github.com/docker/distribution.git $TEMP
docker build -t distribution-builder $TEMP
# Create a dummy distribution-build container so we can run a cp against it.
ID=$(docker create distribution-builder)
# Update the local binary and config.
docker cp $ID:/go/bin/registry registry
docker cp $ID:/go/src/github.com/docker/distribution/cmd/registry/config-example.yml registry
# Cleanup.
docker rm -f $ID
docker rmi distribution-builder
echo "Done."
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/iliangwei/distribution-library-image.git
git@gitee.com:iliangwei/distribution-library-image.git
iliangwei
distribution-library-image
distribution-library-image
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385