-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25775a3
commit fed8603
Showing
4 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Docker安装 | ||
author: 会敲代码的程序猿 | ||
isOriginal: true | ||
date: 2024-11-15 | ||
category: Docker | ||
tag: Docker | ||
--- | ||
|
||
# Docker安装&配置 | ||
|
||
## 多平台安装 | ||
|
||
安装软件这种基础的操作,直接 参考官方文档即可: | ||
|
||
* [在Mac上安装Docker Desktop](https://docs.docker.com/desktop/setup/install/mac-install/) | ||
* [在Windows上安装Docker Desktop](https://docs.docker.com/desktop/setup/install/windows-install/) | ||
* [在Linux上安装Docker Desktop](https://docs.docker.com/desktop/setup/install/linux/) | ||
|
||
验证是否安装成功: | ||
|
||
```shell | ||
$ docker version | ||
$ docker info | ||
$ docker hello-world | ||
# 可能会遇到如下网络错误,需要配置国内镜像源 | ||
$ docker run -it ubuntu bash | ||
docker: error pulling image configuration: download failed after attempts=6: EOF. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
title: Docker镜像加速器 | ||
author: 会敲代码的程序猿 | ||
isOriginal: true | ||
date: 2024-11-16 | ||
category: Docker | ||
tag: Docker | ||
--- | ||
|
||
# Docker镜像加速器 | ||
|
||
## 镜像加速器 | ||
|
||
> [阿里云镜像加速器](https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors),有针对Ubuntu,CentOS,Mac,Windows的配置教程 | ||
**镜像源配置文件** | ||
|
||
* Linux:`/etc/docker/daemon.json` | ||
* Windows: `%USERPROFILE%\.docker\daemon.json` | ||
|
||
**Windows配置:** | ||
|
||
右上角选择Settings图标,打开配置窗口后选择Docker Engine。编辑JSON串,填写加速器地址: | ||
|
||
```shell | ||
{ | ||
"registry-mirrors": ["https://onnxqmp4.mirror.aliyuncs.com"] | ||
} | ||
``` | ||
|
||
![Windows配置镜像加速](http://img.geekyspace.cn/pictures/2024/202411160051539.png) | ||
|
||
**完整的`daemon.json`配置示例:** | ||
|
||
```shell | ||
{ | ||
"builder": { | ||
"gc": { | ||
"defaultKeepStorage": "20GB", | ||
"enabled": true | ||
} | ||
}, | ||
"experimental": false, | ||
"registry-mirrors": [ | ||
"https://onnxqmp4.mirror.aliyuncs.com", | ||
"https://docker.hpcloud.cloud", | ||
"https://docker.m.daocloud.io", | ||
"https://docker.1panel.live", | ||
"http://mirrors.ustc.edu.cn", | ||
"https://docker.chenby.cn", | ||
"https://docker.ckyl.me", | ||
"http://mirror.azure.cn", | ||
"https://hub.rat.dev" | ||
] | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters