Watch 1 Star 2 Fork 1

Newbe36524 / Newbe.McrMirrorPowerShell

Join us
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
mirror for publish netcore image from MCR to dockerhub to speed up download performance in China mainland. spread retract

Clone or download
Loading...
README.md

Newbe.McrMirror

All Contributors

MCR(Miscrosoft Container Registry) 加速器,助你在中国大陆急速下载 netcore 相关的 docker 镜像。

如何使用

存在至少三种方法进行加速:

  • 使用 docker-mcr (推荐)
  • 拉取国内服务器上的镜像
  • 使用 DockerHub 加速器

注意,无论采用什么方式,请先确保本地的 docker 已经正常可用。

使用 docker-mcr (推荐)

docker-mcr 是一个 dotnet core global tool,简单几步,便可以进行安装和使用。

进入dotnet页面,下载并安装 netcore 3.1 SDK

安装完毕后打开控制台运行以下命令:

dotnet tool install newbe.mcrmirror -g 

现在,假如需要拉取 mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim ,则运行以下命令:

docker-mcr -i mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim

等待完成之后,便可以在本地看到已经拉取完毕的镜像。

您可以运行 docker-mcr --help 来查看更多的参数配置方式。

如果您曾经安装过 newbe.mcrmirror ,您需要使用dotnet tool update newbe.mcrmirror -g命令来进行升级,确保最佳的体验。

拉取国内服务器上的镜像

加速的本质是因为我将镜像推送到了国内的服务器,目前在以下服务器均存在镜像:

  • 阿里云 registry.cn-hangzhou.aliyuncs.com/newbe36524
  • 腾讯云 ccr.ccs.tencentyun.com/mcr_newbe36524

以下以阿里云为例进行说明,假设需要拉取 aspnet:3.1-buster-slim

则拼接上面的前缀,则得到地址 registry.cn-hangzhou.aliyuncs.com/newbe36524/aspnet:3.1-buster-slim

然后,为了不修改默认的 Dockerfile 您可以运行以下命令:

docker pull registry.cn-hangzhou.aliyuncs.com/newbe36524/aspnet:3.1-buster-slim
docker tag newbe36524/aspnet:3.1-buster-slim mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim

这样你就成功的在本地得到了 mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim 镜像。

当然,你也可以直接把 registry.cn-hangzhou.aliyuncs.com/newbe36524/aspnet:3.1-buster-slim 写入到你的 Docker file 中。

使用 DockerHub 加速器

我也将镜像推送到了 dockerhub ,所以正常来说,在中国大陆使用 dockerhub 加速器也可以达到加速的效果。

规则,mcr.microsoft.com/dotnet/core/{name}:{tag} -> newbe36524/{name}:{tag}

例如,您可以运行以下命令:

docker pull newbe36524/aspnet:3.1-buster-slim
docker tag newbe36524/aspnet:3.1-buster-slim mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim

这样你就成功的在本地得到了 mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim 镜像。

当然,你也可以直接把 newbe36524/aspnet:3.1-buster-slim 写入到你的 Docker file 中。

在此之前,请确保你正确配置了本地的加速器。

遇到了一点问题?

所有已经被支持的镜像全部罗列在本文档下方,我可能会遗漏一些镜像和标记,请你在这个仓库中提交issue让我知道。

起因经过

将微软发布在 MCR 上的镜像同步到 DockerHub 上,以加速中国大陆的下载速度。

正如我们所知,微软在2018年五月之后,只会将相关镜像打包发布到 MCR 上。

但是,在中国大陆从 MCR 上拉取镜像简直慢得让人发指。

MCR 团队已经决定尝试一些方案为此提速,相关的讨论罗列在这个issue中。我也将会持续跟踪这个issue。

现在,我决定创建这个仓库来将 MCR 上的镜像同步到 DockerHub 以及阿里云上。直到 MCR 速度的问题得到解决。

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Newbe36524

🚇 ⚠️ 💻

James Liang

🤔

fisherwei

🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

All Tags

tag status
sdk:2.1 push image sdk_2.1
sdk:2.1.807 push image sdk_2.1.807
sdk:2.1.807-alpine push image sdk_2.1.807-alpine
sdk:2.1.807-alpine3.11 push image sdk_2.1.807-alpine3.11
sdk:2.1.807-alpine3.12 push image sdk_2.1.807-alpine3.12
sdk:2.1.807-bionic push image sdk_2.1.807-bionic
sdk:2.1.807-bionic-arm32v7 push image sdk_2.1.807-bionic-arm32v7
sdk:2.1.807-focal push image sdk_2.1.807-focal
sdk:2.1.807-stretch push image sdk_2.1.807-stretch
sdk:2.1.807-stretch-arm32v7 push image sdk_2.1.807-stretch-arm32v7
sdk:2.1-alpine push image sdk_2.1-alpine
sdk:2.1-alpine3.11 push image sdk_2.1-alpine3.11
sdk:2.1-alpine3.12 push image sdk_2.1-alpine3.12
sdk:2.1-bionic push image sdk_2.1-bionic
sdk:2.1-bionic-arm32v7 push image sdk_2.1-bionic-arm32v7
sdk:2.1-focal push image sdk_2.1-focal
sdk:2.1-stretch push image sdk_2.1-stretch
sdk:2.1-stretch-arm32v7 push image sdk_2.1-stretch-arm32v7
sdk:3.1 push image sdk_3.1
sdk:3.1.301 push image sdk_3.1.301
sdk:3.1.301-alpine push image sdk_3.1.301-alpine
sdk:3.1.301-alpine3.11 push image sdk_3.1.301-alpine3.11
sdk:3.1.301-alpine3.12 push image sdk_3.1.301-alpine3.12
sdk:3.1.301-bionic push image sdk_3.1.301-bionic
sdk:3.1.301-bionic-arm32v7 push image sdk_3.1.301-bionic-arm32v7
sdk:3.1.301-bionic-arm64v8 push image sdk_3.1.301-bionic-arm64v8
sdk:3.1.301-buster push image sdk_3.1.301-buster
sdk:3.1.301-buster-arm32v7 push image sdk_3.1.301-buster-arm32v7
sdk:3.1.301-buster-arm64v8 push image sdk_3.1.301-buster-arm64v8
sdk:3.1.301-focal push image sdk_3.1.301-focal
sdk:3.1.301-focal-arm64v8 push image sdk_3.1.301-focal-arm64v8
sdk:3.1-alpine push image sdk_3.1-alpine
sdk:3.1-alpine3.11 push image sdk_3.1-alpine3.11
sdk:3.1-alpine3.12 push image sdk_3.1-alpine3.12
sdk:3.1-bionic push image sdk_3.1-bionic
sdk:3.1-bionic-arm32v7 push image sdk_3.1-bionic-arm32v7
sdk:3.1-bionic-arm64v8 push image sdk_3.1-bionic-arm64v8
sdk:3.1-buster push image sdk_3.1-buster
sdk:3.1-buster-arm32v7 push image sdk_3.1-buster-arm32v7
sdk:3.1-buster-arm64v8 push image sdk_3.1-buster-arm64v8
sdk:3.1-focal push image sdk_3.1-focal
sdk:3.1-focal-arm64v8 push image sdk_3.1-focal-arm64v8
sdk:latest push image sdk_latest
runtime-deps:2.1 push image runtime-deps_2.1
runtime-deps:2.1.19 push image runtime-deps_2.1.19
runtime-deps:2.1.19-alpine push image runtime-deps_2.1.19-alpine
runtime-deps:2.1.19-alpine3.11 push image runtime-deps_2.1.19-alpine3.11
runtime-deps:2.1.19-alpine3.12 push image runtime-deps_2.1.19-alpine3.12
runtime-deps:2.1.19-bionic push image runtime-deps_2.1.19-bionic
runtime-deps:2.1.19-bionic-arm32v7 push image runtime-deps_2.1.19-bionic-arm32v7
runtime-deps:2.1.19-focal push image runtime-deps_2.1.19-focal
runtime-deps:2.1.19-stretch-slim push image runtime-deps_2.1.19-stretch-slim
runtime-deps:2.1.19-stretch-slim-arm32v7 push image runtime-deps_2.1.19-stretch-slim-arm32v7
runtime-deps:2.1-alpine push image runtime-deps_2.1-alpine
runtime-deps:2.1-alpine3.11 push image runtime-deps_2.1-alpine3.11
runtime-deps:2.1-alpine3.12 push image runtime-deps_2.1-alpine3.12
runtime-deps:2.1-bionic push image runtime-deps_2.1-bionic
runtime-deps:2.1-bionic-arm32v7 push image runtime-deps_2.1-bionic-arm32v7
runtime-deps:2.1-focal push image runtime-deps_2.1-focal
runtime-deps:2.1-stretch-slim push image runtime-deps_2.1-stretch-slim
runtime-deps:2.1-stretch-slim-arm32v7 push image runtime-deps_2.1-stretch-slim-arm32v7
runtime-deps:3.1 push image runtime-deps_3.1
runtime-deps:3.1.5 push image runtime-deps_3.1.5
runtime-deps:3.1.5-alpine push image runtime-deps_3.1.5-alpine
runtime-deps:3.1.5-alpine3.11 push image runtime-deps_3.1.5-alpine3.11
runtime-deps:3.1.5-alpine3.11-arm64v8 push image runtime-deps_3.1.5-alpine3.11-arm64v8
runtime-deps:3.1.5-alpine3.12 push image runtime-deps_3.1.5-alpine3.12
runtime-deps:3.1.5-alpine3.12-arm64v8 push image runtime-deps_3.1.5-alpine3.12-arm64v8
runtime-deps:3.1.5-alpine-arm64v8 push image runtime-deps_3.1.5-alpine-arm64v8
runtime-deps:3.1.5-bionic push image runtime-deps_3.1.5-bionic
runtime-deps:3.1.5-bionic-arm32v7 push image runtime-deps_3.1.5-bionic-arm32v7
runtime-deps:3.1.5-bionic-arm64v8 push image runtime-deps_3.1.5-bionic-arm64v8
runtime-deps:3.1.5-buster-slim push image runtime-deps_3.1.5-buster-slim
runtime-deps:3.1.5-buster-slim-arm32v7 push image runtime-deps_3.1.5-buster-slim-arm32v7
runtime-deps:3.1.5-buster-slim-arm64v8 push image runtime-deps_3.1.5-buster-slim-arm64v8
runtime-deps:3.1.5-focal push image runtime-deps_3.1.5-focal
runtime-deps:3.1.5-focal-arm64v8 push image runtime-deps_3.1.5-focal-arm64v8
runtime-deps:3.1-alpine push image runtime-deps_3.1-alpine
runtime-deps:3.1-alpine3.11 push image runtime-deps_3.1-alpine3.11
runtime-deps:3.1-alpine3.11-arm64v8 push image runtime-deps_3.1-alpine3.11-arm64v8
runtime-deps:3.1-alpine3.12 push image runtime-deps_3.1-alpine3.12
runtime-deps:3.1-alpine3.12-arm64v8 push image runtime-deps_3.1-alpine3.12-arm64v8
runtime-deps:3.1-alpine-arm64v8 push image runtime-deps_3.1-alpine-arm64v8
runtime-deps:3.1-bionic push image runtime-deps_3.1-bionic
runtime-deps:3.1-bionic-arm32v7 push image runtime-deps_3.1-bionic-arm32v7
runtime-deps:3.1-bionic-arm64v8 push image runtime-deps_3.1-bionic-arm64v8
runtime-deps:3.1-buster-slim push image runtime-deps_3.1-buster-slim
runtime-deps:3.1-buster-slim-arm32v7 push image runtime-deps_3.1-buster-slim-arm32v7
runtime-deps:3.1-buster-slim-arm64v8 push image runtime-deps_3.1-buster-slim-arm64v8
runtime-deps:3.1-focal push image runtime-deps_3.1-focal
runtime-deps:3.1-focal-arm64v8 push image runtime-deps_3.1-focal-arm64v8
runtime-deps:latest push image runtime-deps_latest
runtime:2.1 push image runtime_2.1
runtime:2.1.19 push image runtime_2.1.19
runtime:2.1.19-alpine push image runtime_2.1.19-alpine
runtime:2.1.19-alpine3.11 push image runtime_2.1.19-alpine3.11
runtime:2.1.19-alpine3.12 push image runtime_2.1.19-alpine3.12
runtime:2.1.19-bionic push image runtime_2.1.19-bionic
runtime:2.1.19-bionic-arm32v7 push image runtime_2.1.19-bionic-arm32v7
runtime:2.1.19-focal push image runtime_2.1.19-focal
runtime:2.1.19-stretch-slim push image runtime_2.1.19-stretch-slim
runtime:2.1.19-stretch-slim-arm32v7 push image runtime_2.1.19-stretch-slim-arm32v7
runtime:2.1-alpine push image runtime_2.1-alpine
runtime:2.1-alpine3.11 push image runtime_2.1-alpine3.11
runtime:2.1-alpine3.12 push image runtime_2.1-alpine3.12
runtime:2.1-bionic push image runtime_2.1-bionic
runtime:2.1-bionic-arm32v7 push image runtime_2.1-bionic-arm32v7
runtime:2.1-focal push image runtime_2.1-focal
runtime:2.1-stretch-slim push image runtime_2.1-stretch-slim
runtime:2.1-stretch-slim-arm32v7 push image runtime_2.1-stretch-slim-arm32v7
runtime:3.1 push image runtime_3.1
runtime:3.1.5 push image runtime_3.1.5
runtime:3.1.5-alpine push image runtime_3.1.5-alpine
runtime:3.1.5-alpine3.11 push image runtime_3.1.5-alpine3.11
runtime:3.1.5-alpine3.11-arm64v8 push image runtime_3.1.5-alpine3.11-arm64v8
runtime:3.1.5-alpine3.12 push image runtime_3.1.5-alpine3.12
runtime:3.1.5-alpine3.12-arm64v8 push image runtime_3.1.5-alpine3.12-arm64v8
runtime:3.1.5-alpine-arm64v8 push image runtime_3.1.5-alpine-arm64v8
runtime:3.1.5-bionic push image runtime_3.1.5-bionic
runtime:3.1.5-bionic-arm32v7 push image runtime_3.1.5-bionic-arm32v7
runtime:3.1.5-bionic-arm64v8 push image runtime_3.1.5-bionic-arm64v8
runtime:3.1.5-buster-slim push image runtime_3.1.5-buster-slim
runtime:3.1.5-buster-slim-arm32v7 push image runtime_3.1.5-buster-slim-arm32v7
runtime:3.1.5-buster-slim-arm64v8 push image runtime_3.1.5-buster-slim-arm64v8
runtime:3.1.5-focal push image runtime_3.1.5-focal
runtime:3.1.5-focal-arm64v8 push image runtime_3.1.5-focal-arm64v8
runtime:3.1-alpine push image runtime_3.1-alpine
runtime:3.1-alpine3.11 push image runtime_3.1-alpine3.11
runtime:3.1-alpine3.11-arm64v8 push image runtime_3.1-alpine3.11-arm64v8
runtime:3.1-alpine3.12 push image runtime_3.1-alpine3.12
runtime:3.1-alpine3.12-arm64v8 push image runtime_3.1-alpine3.12-arm64v8
runtime:3.1-alpine-arm64v8 push image runtime_3.1-alpine-arm64v8
runtime:3.1-bionic push image runtime_3.1-bionic
runtime:3.1-bionic-arm32v7 push image runtime_3.1-bionic-arm32v7
runtime:3.1-bionic-arm64v8 push image runtime_3.1-bionic-arm64v8
runtime:3.1-buster-slim push image runtime_3.1-buster-slim
runtime:3.1-buster-slim-arm32v7 push image runtime_3.1-buster-slim-arm32v7
runtime:3.1-buster-slim-arm64v8 push image runtime_3.1-buster-slim-arm64v8
runtime:3.1-focal push image runtime_3.1-focal
runtime:3.1-focal-arm64v8 push image runtime_3.1-focal-arm64v8
runtime:latest push image runtime_latest
aspnet:2.1 push image aspnet_2.1
aspnet:2.1.19 push image aspnet_2.1.19
aspnet:2.1.19-alpine push image aspnet_2.1.19-alpine
aspnet:2.1.19-alpine3.11 push image aspnet_2.1.19-alpine3.11
aspnet:2.1.19-alpine3.12 push image aspnet_2.1.19-alpine3.12
aspnet:2.1.19-bionic push image aspnet_2.1.19-bionic
aspnet:2.1.19-bionic-arm32v7 push image aspnet_2.1.19-bionic-arm32v7
aspnet:2.1.19-focal push image aspnet_2.1.19-focal
aspnet:2.1.19-stretch-slim push image aspnet_2.1.19-stretch-slim
aspnet:2.1.19-stretch-slim-arm32v7 push image aspnet_2.1.19-stretch-slim-arm32v7
aspnet:2.1-alpine push image aspnet_2.1-alpine
aspnet:2.1-alpine3.11 push image aspnet_2.1-alpine3.11
aspnet:2.1-alpine3.12 push image aspnet_2.1-alpine3.12
aspnet:2.1-bionic push image aspnet_2.1-bionic
aspnet:2.1-bionic-arm32v7 push image aspnet_2.1-bionic-arm32v7
aspnet:2.1-focal push image aspnet_2.1-focal
aspnet:2.1-stretch-slim push image aspnet_2.1-stretch-slim
aspnet:2.1-stretch-slim-arm32v7 push image aspnet_2.1-stretch-slim-arm32v7
aspnet:3.1 push image aspnet_3.1
aspnet:3.1.5 push image aspnet_3.1.5
aspnet:3.1.5-alpine push image aspnet_3.1.5-alpine
aspnet:3.1.5-alpine3.11 push image aspnet_3.1.5-alpine3.11
aspnet:3.1.5-alpine3.11-arm64v8 push image aspnet_3.1.5-alpine3.11-arm64v8
aspnet:3.1.5-alpine3.12 push image aspnet_3.1.5-alpine3.12
aspnet:3.1.5-alpine3.12-arm64v8 push image aspnet_3.1.5-alpine3.12-arm64v8
aspnet:3.1.5-alpine-arm64v8 push image aspnet_3.1.5-alpine-arm64v8
aspnet:3.1.5-bionic push image aspnet_3.1.5-bionic
aspnet:3.1.5-bionic-arm32v7 push image aspnet_3.1.5-bionic-arm32v7
aspnet:3.1.5-bionic-arm64v8 push image aspnet_3.1.5-bionic-arm64v8
aspnet:3.1.5-buster-slim push image aspnet_3.1.5-buster-slim
aspnet:3.1.5-buster-slim-arm32v7 push image aspnet_3.1.5-buster-slim-arm32v7
aspnet:3.1.5-buster-slim-arm64v8 push image aspnet_3.1.5-buster-slim-arm64v8
aspnet:3.1.5-focal push image aspnet_3.1.5-focal
aspnet:3.1.5-focal-arm64v8 push image aspnet_3.1.5-focal-arm64v8
aspnet:3.1-alpine push image aspnet_3.1-alpine
aspnet:3.1-alpine3.11 push image aspnet_3.1-alpine3.11
aspnet:3.1-alpine3.11-arm64v8 push image aspnet_3.1-alpine3.11-arm64v8
aspnet:3.1-alpine3.12 push image aspnet_3.1-alpine3.12
aspnet:3.1-alpine3.12-arm64v8 push image aspnet_3.1-alpine3.12-arm64v8
aspnet:3.1-alpine-arm64v8 push image aspnet_3.1-alpine-arm64v8
aspnet:3.1-bionic push image aspnet_3.1-bionic
aspnet:3.1-bionic-arm32v7 push image aspnet_3.1-bionic-arm32v7
aspnet:3.1-bionic-arm64v8 push image aspnet_3.1-bionic-arm64v8
aspnet:3.1-buster-slim push image aspnet_3.1-buster-slim
aspnet:3.1-buster-slim-arm32v7 push image aspnet_3.1-buster-slim-arm32v7
aspnet:3.1-buster-slim-arm64v8 push image aspnet_3.1-buster-slim-arm64v8
aspnet:3.1-focal push image aspnet_3.1-focal
aspnet:3.1-focal-arm64v8 push image aspnet_3.1-focal-arm64v8
aspnet:latest push image aspnet_latest
server:2017-CU10-ubuntu push image server_2017-CU10-ubuntu
server:2017-CU11-ubuntu push image server_2017-CU11-ubuntu
server:2017-CU12-ubuntu push image server_2017-CU12-ubuntu
server:2017-CU13-ubuntu push image server_2017-CU13-ubuntu
server:2017-CU14-ubuntu push image server_2017-CU14-ubuntu
server:2017-CU15-ubuntu push image server_2017-CU15-ubuntu
server:2017-CU16-ubuntu push image server_2017-CU16-ubuntu
server:2017-CU17-ubuntu push image server_2017-CU17-ubuntu
server:2017-CU18-ubuntu-16.04 push image server_2017-CU18-ubuntu-16.04
server:2017-CU19-ubuntu-16.04 push image server_2017-CU19-ubuntu-16.04
server:2017-CU1-ubuntu push image server_2017-CU1-ubuntu
server:2017-CU20-ubuntu-16.04 push image server_2017-CU20-ubuntu-16.04
server:2017-CU2-ubuntu push image server_2017-CU2-ubuntu
server:2017-CU3-ubuntu push image server_2017-CU3-ubuntu
server:2017-CU4-ubuntu push image server_2017-CU4-ubuntu
server:2017-CU5-ubuntu push image server_2017-CU5-ubuntu
server:2017-CU6-ubuntu push image server_2017-CU6-ubuntu
server:2017-CU7-ubuntu push image server_2017-CU7-ubuntu
server:2017-CU8-ubuntu push image server_2017-CU8-ubuntu
server:2017-CU9-ubuntu push image server_2017-CU9-ubuntu
server:2017-GA-ubuntu push image server_2017-GA-ubuntu
server:2017-GDR-ubuntu push image server_2017-GDR-ubuntu
server:2017-latest push image server_2017-latest
server:2019-CU1-ubuntu-16.04 push image server_2019-CU1-ubuntu-16.04
server:2019-CU2-ubuntu-16.04 push image server_2019-CU2-ubuntu-16.04
server:2019-CU3-ubuntu-16.04 push image server_2019-CU3-ubuntu-16.04
server:2019-CU4-ubuntu-16.04 push image server_2019-CU4-ubuntu-16.04
server:2019-CU5-ubuntu-16.04 push image server_2019-CU5-ubuntu-16.04
server:2019-GA-ubuntu-16.04 push image server_2019-GA-ubuntu-16.04
server:2019-GDR1-ubuntu-16.04 push image server_2019-GDR1-ubuntu-16.04
server:2019-latest push image server_2019-latest
server:latest push image server_latest

Comments ( 0 )

Sign in for post a comment

PowerShell
1
https://gitee.com/yks/Newbe.McrMirror.git
git@gitee.com:yks/Newbe.McrMirror.git
yks
Newbe.McrMirror
Newbe.McrMirror
master

Help Search