[*] 修改说明文档
This commit is contained in:
parent
dfc315c801
commit
2571ca9ffd
48
README.md
48
README.md
@ -3,17 +3,32 @@
|
|||||||
```bash
|
```bash
|
||||||
# apt + ntp
|
# apt + ntp
|
||||||
curl -sSL https://git.martin98.com/MartinFarm/init/raw/branch/main/init-apt.sh | bash
|
curl -sSL https://git.martin98.com/MartinFarm/init/raw/branch/main/init-apt.sh | bash
|
||||||
|
|
||||||
# docker-ce
|
# docker-ce
|
||||||
curl -sSL https://git.martin98.com/MartinFarm/init/raw/branch/main/init-docker.sh | bash
|
curl -sSL https://git.martin98.com/MartinFarm/init/raw/branch/main/init-docker.sh | bash
|
||||||
|
|
||||||
# 初始化全部
|
# 初始化全部
|
||||||
curl -sSL https://git.martin98.com/MartinFarm/init/raw/branch/main/init-all.sh | bash
|
curl -sSL https://git.martin98.com/MartinFarm/init/raw/branch/main/init-all.sh | bash
|
||||||
```
|
```
|
||||||
|
#### Python 镜像源配置测试
|
||||||
|
```bash
|
||||||
|
pip config set global.index-url https://mirrors.martin98.com/repository/pypi-group/simple
|
||||||
|
```
|
||||||
|
#### NPM
|
||||||
|
```bash
|
||||||
|
npm config set registry https://mirrors.martin98.com/repository/npm-group/
|
||||||
|
```
|
||||||
|
|
||||||
|
##### docker 容器中
|
||||||
|
```bash
|
||||||
|
RUN --mount=type=cache,target=/var/cache/apt \
|
||||||
|
--mount=type=cache,target=/var/lib/apt \
|
||||||
|
sed -i '6,$d' /etc/apt/sources.list.d/dhttps://mirrors.mebian.sources && \
|
||||||
|
sed -i 's|http://deb.debian.org/debian|artin98.com/repository/debian-tsinghua/|g' /etc/apt/sources.list.d/debian.sources && \
|
||||||
|
apt update && \
|
||||||
|
apt install -y --no-install-recommends \
|
||||||
|
gcc \
|
||||||
|
g++ \
|
||||||
|
python3-dev
|
||||||
|
```
|
||||||
|
|
||||||
#### 进入容器
|
#### 进入容器
|
||||||
```bash
|
```bash
|
||||||
@ -30,26 +45,3 @@ docker compose run debian ./init-apt.sh
|
|||||||
```bash
|
```bash
|
||||||
docker compose run ubuntu ./init-apt.sh
|
docker compose run ubuntu ./init-apt.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
##### docker 容器中
|
|
||||||
```bash
|
|
||||||
RUN --mount=type=cache,target=/var/cache/apt \
|
|
||||||
--mount=type=cache,target=/var/lib/apt \
|
|
||||||
sed -i '6,$d' /etc/apt/sources.list.d/dhttps://mirrors.mebian.sources && \
|
|
||||||
sed -i 's|http://deb.debian.org/debian|artin98.com/repository/debian-tsinghua/|g' /etc/apt/sources.list.d/debian.sources && \
|
|
||||||
apt update && \
|
|
||||||
apt install -y --no-install-recommends \
|
|
||||||
gcc \
|
|
||||||
g++ \
|
|
||||||
python3-dev
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Python 镜像源配置测试
|
|
||||||
```bash
|
|
||||||
pip config set global.index-url https://mirrors.martin98.com/repository/pypi-group/simple
|
|
||||||
```
|
|
||||||
|
|
||||||
#### NPM
|
|
||||||
```bash
|
|
||||||
npm config set registry https://mirrors.martin98.com/repository/npm-group/
|
|
||||||
```
|
|
Loading…
x
Reference in New Issue
Block a user