init/README.md
2025-01-04 15:20:40 +08:00

34 lines
798 B
Markdown

#### 进入容器
```bash
docker compose run debian bash
```
```bash
docker compose run ubuntu bash
```
#### 镜像源配置测试
```bash
docker compose run debian ./init-apt.sh
```
```bash
docker compose run ubuntu ./init-apt.sh
```
##### 直接运行
```bash
curl -sSL https://git.martin98.com/MartinFarm/init/raw/branch/main/init-apt.sh | bash
```
##### 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/debian.sources && \
sed -i 's|http://deb.debian.org/debian|https://mirrors.martin98.com/repository/debian-tsinghua/|g' /etc/apt/sources.list.d/debian.sources && \
apt update && \
apt install -y --no-install-recommends \
gcc \
g++ \
python3-dev
```