> For the complete documentation index, see [llms.txt](https://moekiwisama-1.gitbook.io/minecraft-docker/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://moekiwisama-1.gitbook.io/minecraft-docker/le-jie-alpine/wei-shen-me-xu-yao-alpine.md).

# 为什么需要 Alpine

之前的 Centos 是从 docker hub 中下载下来的，我们可以看一下它的大小

{% embed url="<https://hub.docker.com/layers/centos/library/centos/7/images/sha256-e4ca2ed0202e76be184e75fb26d14bf974193579039d5573fb2348664deef76e?context=explore>" %}

嗯，72M，还不错，可以更小嘛？

{% embed url="<https://hub.docker.com/layers/alpine/library/alpine/latest/images/sha256-1775bebec23e1f3ce486989bfc9ff3c4e951690df84aa9f926497d82f2ffca9d?context=explore>" %}

嗯？有 2.68M 的 Docker Image？

快拉下来看看

```bash
docker run -it alpine
```

跑起来了

Alpine 最大的特点就是小，非常小。他是怎么做到的呢？按照我们平时的认知，最基础的 Linux 指令 ，cp ls 那些什么的，也要几百kb吧

我们可以看一下 Ubuntu的这些基础指令有多大，嗯，一个 cp 就要 100多K

![Ubuntu](https://4102141993-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McxO38P3xiLG7yDv_Y1%2F-McxzEq9Dk2M8RdA8afZ%2F-Mcy-2USq2JbXlhEbJaH%2Fimage.png?alt=media\&token=0a6e2423-b81b-4a04-acbf-f33ba1705663)

Alpine 呢？

![](https://4102141993-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McxO38P3xiLG7yDv_Y1%2F-McxzEq9Dk2M8RdA8afZ%2F-Mcy-Jcxng3BGCEnjnQW%2Fimage.png?alt=media\&token=df8ca6f6-12fa-4110-8a23-1e1d2ba9dadd)

会发现，所有的常用指令都指向了busybox，而且一个 busybox 只有800多K

busybox 是一种提供精简的Unix工具集，他很小。加上一堆其他的骚操作，就使 Alpine达到了 3M 不到的大小
