2 |
3 | ## Docker Mirror
4 |
5 | 从去年开始. [hub.docker.com](https://hub.docker.com/) 在国内的访问速度极慢. 当时大家主要还是依赖国内的一些镜像源: 如中科院或alipapa etc. 但是今年逐渐所有的国内镜像站也逐渐关闭. 在墙内的小伙伴想要拉取镜像变成了很困难的事情。
6 |
7 | 现在可以使用 [docker-mirror](https://dockermirror.com) 来加速你的镜像服务. 仅需根据你的使用情况简单几步配置即可完成配置. 此外还提供两个搜索网站来帮助检索镜像.
8 |
9 | - [docker-mirror](https://dockermirror.com)
10 | - [hub.dockermirror](https://hub.dockermirror.com/)
11 |
12 | ## 视频教程
13 |
14 | 注: 视频中使用的是 orb. 基本操作和直接使用 docker 相同. 具体细节可以查看下面的配置方法.
15 |
16 |
17 |
18 | ## 配置方法
19 |
20 | ### 使用 Docker File
21 |
22 | 编辑 `/etc/docker/daemon.json`,并添加 [registry-mirror](https://docs.docker.com/docker-hub/mirror/#configure-the-docker-daemon) 键和值,使更改始终生效。
23 |
24 | ```json
25 | {
26 | "registry-mirrors": ["https://registry.dockermirror.com"]
27 | }
28 | ```
29 |
30 | 更多细节, 见 [docker 文档](https://docs.docker.com/docker-hub/mirror/#configure-the-docker-daemon).
31 |
32 | 如果你正在使用 orbstack. 你也可以直接在 `~/.orbstack/config/docker.json` 中编辑配置,然后用 `orb restart docker` 重启引擎。
33 |
34 | ```json
35 | {
36 | "hosts": ["https://registry.dockermirror.com"]
37 | }
38 | ```
39 |
40 | 更多 orb 细节, 见 [orb 文档](https://docs.orbstack.dev/docker/#engine-config).
41 |
42 | ### 命令行使用配置
43 |
44 | 在手动拉取 dockerd 镜像时,通过 --registry-mirror 选项来使更改 registry。
45 |
46 | ```bash
47 | $ docker pull ubuntu --registry-mirror=https://registry.dockermirror.com
48 | ```
49 |
50 | 更多细节, 见 [docker pull 文档](https://docs.docker.com/reference/cli/docker/image/pull/?highlight=docker&highlight=pull).
51 |
52 | ### 直接使用 Registry
53 |
54 | 手动指定要从注册表中提取的路径。注册表路径类似于 URL,但不包含协议指定符 (https://)。
55 |
56 | ```bash
57 | $ docker pull registry.dockermirror.com/ubuntu
58 | ```
59 |
60 | 更多细节, 见 [docker pull-from-a-different-registry 文档](https://docs.docker.com/reference/cli/docker/image/pull/?highlight=docker&highlight=pull#pull-from-a-different-registry).
61 |
62 | ## 相关链接
63 |
64 | - [github](https://github.com/docker-mirrors)
65 | - [website-github](https://github.com/docker-mirrors/website)
66 | - [website](https://dockermirror.com)
67 | - [hub.dockermirror](https://hub.dockermirror.com)
68 |
--------------------------------------------------------------------------------
/app/not-found.tsx:
--------------------------------------------------------------------------------
1 | import { AspectRatio } from '@/components/ui/aspect-ratio';
2 | import { Button } from '@/components/ui/button';
3 | import {
4 | Card,
5 | CardContent,
6 | CardDescription,
7 | CardHeader,
8 | CardTitle,
9 | } from '@/components/ui/card';
10 | import { site } from '@/constants/site';
11 | import { ArrowLeftIcon, CircleIcon, StarIcon } from '@radix-ui/react-icons';
12 | import dayjs from 'dayjs';
13 | import Link from 'next/link';
14 |
15 | export default async function NotFound() {
16 | const repo = await fetch(
17 | `${process.env.GITHUB_HOST}/repos/docker-mirrors/website`,
18 | { next: { revalidate: 60 * 3 * 60 * 1000 } },
19 | )
20 | .then((response) => response.json())
21 | .then((response) => (!response.message ? response : {}));
22 |
23 | return (
24 |
2 |
3 | [](http://isitmaintained.com/project/docker-mirrors/website 'Percentage of issues still open')
4 | [](http://isitmaintained.com/project/docker-mirrors/website 'Average time to resolve an issue')
5 | [](http://makeapullrequest.com)
6 |
7 | 加速镜像下载. 解除下载限制. 配套国内搜索镜像网站 - [docker-mirrors](https://dockermirror.com).
8 |
9 |
10 |
11 | ## 🌎 [Website](https://dockermirror.com)
12 |
13 |
76 |
77 |
78 |
79 | |
80 |
2 |
3 | [](http://isitmaintained.com/project/docker-mirrors/website 'Percentage of issues still open')
4 | [](http://isitmaintained.com/project/docker-mirrors/website 'Average time to resolve an issue')
5 | [](http://makeapullrequest.com)
6 |
7 | Accelerate mirror downloads. Unlocks download restrictions. Support for searching domestic mirrors - [docker-mirrors](https://dockermirror.com).
8 |
9 |
10 |
11 |
81 |
82 |
83 |
84 | |
85 |
33 | {formatMessage('table.pageSize')} 34 |
35 | 52 |{row.getValue('short_description')}
85 |161 | {body} 162 |
163 | ) 164 | }) 165 | FormMessage.displayName = "FormMessage" 166 | 167 | export { 168 | useFormField, 169 | Form, 170 | FormItem, 171 | FormLabel, 172 | FormControl, 173 | FormDescription, 174 | FormMessage, 175 | FormField, 176 | } 177 | -------------------------------------------------------------------------------- /components/ui/alert-dialog.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" 5 | 6 | import { cn } from "@/lib/utils" 7 | import { buttonVariants } from "@/components/ui/button" 8 | 9 | const AlertDialog = AlertDialogPrimitive.Root 10 | 11 | const AlertDialogTrigger = AlertDialogPrimitive.Trigger 12 | 13 | const AlertDialogPortal = AlertDialogPrimitive.Portal 14 | 15 | const AlertDialogOverlay = React.forwardRef< 16 | React.ElementRef