All checks were successful
Publish to Confluence / confluence (push) Successful in 1m32s
90 lines
2.5 KiB
Markdown
90 lines
2.5 KiB
Markdown
# 基础镜像地址记录
|
||
|
||
## Jenkins插件镜像
|
||
|
||
- 配置路径:`Dashboard > Manage Jenkins > Plugins > Advanced settings > Update Site > URL`
|
||
- 镜像地址:`https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json`
|
||
- 点击 `submit` 使其生效
|
||
|
||
## Maven镜像仓库
|
||
### 阿里云Maven镜像仓库
|
||
- 配置路径 `settings.xml`
|
||
- ```xml
|
||
<mirror>
|
||
<id>aliyun-central</id>
|
||
<name>aliyun-central</name>
|
||
<url>https://maven.aliyun.com/repository/central</url>
|
||
<mirrorOf>${aliyunc}</mirrorOf>
|
||
</mirror>
|
||
<mirror>
|
||
<id>aliyun-public</id>
|
||
<name>aliyun-public</name>
|
||
<url>https://maven.aliyun.com/repository/public</url>
|
||
<mirrorOf>${aliyunp}</mirrorOf>
|
||
</mirror>
|
||
<mirror>
|
||
<id>nexus</id>
|
||
<name>this is my nexus</name>
|
||
<url>https://xxx.xxx.xxx/xxx/</url>
|
||
<mirrorOf>*</mirrorOf>
|
||
</mirror>
|
||
```
|
||
- 使用方式:
|
||
- ```shell
|
||
#- 使用私有仓库 nexus
|
||
mvn clean install
|
||
|
||
#- 使用aliyun仓库
|
||
mvn clean install -Daliyunp=*
|
||
|
||
#- 使用aliyun
|
||
mvn clean install -Daliyunp=public -Daliyunc=central
|
||
```
|
||
|
||
## NPM镜像仓库
|
||
- 使用方式
|
||
- ```shell
|
||
npm config set registry https://registry.npmmirror.com
|
||
#- 或者
|
||
npm install xxx --registry https://registry.npmmirror.com
|
||
```
|
||
|
||
## Docker镜像仓库
|
||
- 为了加速镜像拉取,你可以使用以下命令设置 registry mirror:
|
||
- ```shell
|
||
sudo tee /etc/docker/daemon.json <<EOF
|
||
{
|
||
"registry-mirrors": ["https://docker.zhai.cm"]
|
||
}
|
||
EOF
|
||
```
|
||
- 用法:
|
||
- 原拉取镜像命令: `docker pull library/alpine:latest`
|
||
- 加速拉取镜像命令: `docker pull docker.zhai.cm/library/alpine:latest`
|
||
|
||
- 其余备选列表:
|
||
- https://fast360.xyz 正常
|
||
- https://docker.m.daocloud.io 正常
|
||
- https://1ms.run 正常
|
||
- https://docker.zhai.cm 正常
|
||
- https://docker.gbfeng.com 正常
|
||
- https://hub.haod.eu.org 正常
|
||
- https://xdark.top 正常
|
||
|
||
## Cargo 镜像
|
||
- 配置教程:https://www.cnblogs.com/trigger-cn/p/18334279
|
||
- 也可以直接命令行(阿里云镜像): `--index sparse+https://mirrors.aliyun.com/crates.io-index/`
|
||
- ```shell
|
||
RUN set -eux && cargo install --index sparse+https://mirrors.aliyun.com/crates.io-index/ --locked monolith
|
||
```
|
||
|
||
## 修改 Dockerfile 中的 APT 源
|
||
```dockerfile
|
||
RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
|
||
```
|
||
|
||
## 修改 Dockerfile 中的 pip 源
|
||
```dockerfile
|
||
RUN pip3 install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple -U pip
|
||
RUN pip3 config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
|
||
``` |