Alpine 下各语言的大小
环境
Docker:alpine:3.18.3@sha256:c5c5fda71656f28e49ac9c5416b3643eaa6a108a8093151d6d1afc9463be8e33
> apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
v3.18.3-247-g11534630dd2 [https://dl-cdn.alpinelinux.org/alpine/v3.18/main]
v3.18.3-257-gc78192d5e42 [https://dl-cdn.alpinelinux.org/alpine/v3.18/community]
OK: 20066 distinct packages available
脚本类
Lua 9MB
Ruby 25MB
Perl 45MB
Python3 51MB
NodeJS 57MB
Python3
> apk add python3
(1/17) Installing libbz2 (1.0.8-r5)
(2/17) Installing libexpat (2.5.0-r1)
(3/17) Installing libffi (3.4.4-r2)
(4/17) Installing gdbm (1.23-r1)
(5/17) Installing xz-libs (5.4.3-r0)
(6/17) Installing libgcc (12.2.1_git20220924-r10)
(7/17) Installing libstdc++ (12.2.1_git20220924-r10)
(8/17) Installing mpdecimal (2.5.1-r2)
(9/17) Installing ncurses-terminfo-base (6.4_p20230506-r0)
(10/17) Installing libncursesw (6.4_p20230506-r0)
(11/17) Installing libpanelw (6.4_p20230506-r0)
(12/17) Installing readline (8.2.1-r1)
(13/17) Installing sqlite-libs (3.41.2-r2)
(14/17) Installing python3 (3.11.5-r0)
(15/17) Installing python3-pycache-pyc0 (3.11.5-r0)
(16/17) Installing pyc (0.1-r0)
(17/17) Installing python3-pyc (3.11.5-r0)
Executing busybox-1.36.1-r2.trigger
OK: 51 MiB in 32 packages
NodeJS
> apk add nodejs
(1/9) Installing ca-certificates (20230506-r0)
(2/9) Installing brotli-libs (1.0.9-r14)
(3/9) Installing c-ares (1.19.1-r0)
(4/9) Installing libgcc (12.2.1_git20220924-r10)
(5/9) Installing icu-data-en (73.2-r2)
Executing icu-data-en-73.2-r2.post-install
*
* If you need ICU with non-English locales and legacy charset support, install
* package icu-data-full.
*
(6/9) Installing libstdc++ (12.2.1_git20220924-r10)
(7/9) Installing icu-libs (73.2-r2)
(8/9) Installing nghttp2-libs (1.55.1-r0)
(9/9) Installing nodejs (18.17.1-r0)
Executing busybox-1.36.1-r2.trigger
Executing ca-certificates-20230506-r0.trigger
OK: 57 MiB in 24 packages
Ruby
> apk add ruby
(1/10) Installing ca-certificates (20230506-r0)
(2/10) Installing gmp (6.2.1-r3)
(3/10) Installing libffi (3.4.4-r2)
(4/10) Installing ncurses-terminfo-base (6.4_p20230506-r0)
(5/10) Installing libncursesw (6.4_p20230506-r0)
(6/10) Installing readline (8.2.1-r1)
(7/10) Installing yaml (0.2.5-r1)
(8/10) Installing ruby-libs (3.2.2-r0)
(9/10) Installing libucontext (1.2-r2)
(10/10) Installing ruby (3.2.2-r0)
Executing busybox-1.36.1-r2.trigger
Executing ca-certificates-20230506-r0.trigger
OK: 25 MiB in 25 packages
Lua
> apk add lua
(1/5) Installing lua5.4-libs (5.4.6-r0)
(2/5) Installing ncurses-terminfo-base (6.4_p20230506-r0)
(3/5) Installing libncursesw (6.4_p20230506-r0)
(4/5) Installing readline (8.2.1-r1)
(5/5) Installing lua5.4 (5.4.6-r0)
Executing busybox-1.36.1-r2.trigger
OK: 9 MiB in 20 packages
Perl
> apk add perl
(1/2) Installing libbz2 (1.0.8-r5)
(2/2) Installing perl (5.36.1-r2)
Executing busybox-1.36.1-r2.trigger
OK: 45 MiB in 17 packages
运行时类
Java JRE 200MB
Java JDK 287MB
DotNet Runtime 393MB
DotNet SDK 518MB
Java
> apk add openjdk17-jre
apk add openjdk17-jre
(1/27) Installing java-common (0.5-r0)
(2/27) Installing libffi (3.4.4-r2)
(3/27) Installing p11-kit (0.24.1-r2)
(4/27) Installing libtasn1 (4.19.0-r1)
(5/27) Installing p11-kit-trust (0.24.1-r2)
(6/27) Installing ca-certificates (20230506-r0)
(7/27) Installing java-cacerts (1.0-r1)
(8/27) Installing openjdk17-jre-headless (17.0.8_p7-r0)
(9/27) Installing libxau (1.0.11-r2)
(10/27) Installing libmd (1.0.4-r2)
(11/27) Installing libbsd (0.11.7-r1)
(12/27) Installing libxdmcp (1.1.4-r2)
(13/27) Installing libxcb (1.15-r1)
(14/27) Installing libx11 (1.8.4-r4)
(15/27) Installing libxext (1.3.5-r2)
(16/27) Installing libxi (1.8.1-r0)
(17/27) Installing libxrender (0.9.11-r3)
(18/27) Installing libxtst (1.2.4-r2)
(19/27) Installing alsa-lib (1.2.9-r1)
(20/27) Installing brotli-libs (1.0.9-r14)
(21/27) Installing libbz2 (1.0.8-r5)
(22/27) Installing libpng (1.6.39-r3)
(23/27) Installing freetype (2.13.0-r5)
(24/27) Installing giflib (5.2.1-r4)
(25/27) Installing libjpeg-turbo (2.1.5.1-r3)
(26/27) Installing lcms2 (2.15-r2)
(27/27) Installing openjdk17-jre (17.0.8_p7-r0)
Executing busybox-1.36.1-r2.trigger
Executing java-common-0.5-r0.trigger
Executing ca-certificates-20230506-r0.trigger
OK: 200 MiB in 42 packages
> apk add openjdk17-jdk
(1/29) Installing java-common (0.5-r0)
(2/29) Installing libffi (3.4.4-r2)
(3/29) Installing p11-kit (0.24.1-r2)
(4/29) Installing libtasn1 (4.19.0-r1)
(5/29) Installing p11-kit-trust (0.24.1-r2)
(6/29) Installing ca-certificates (20230506-r0)
(7/29) Installing java-cacerts (1.0-r1)
(8/29) Installing openjdk17-jre-headless (17.0.8_p7-r0)
(9/29) Installing libxau (1.0.11-r2)
(10/29) Installing libmd (1.0.4-r2)
(11/29) Installing libbsd (0.11.7-r1)
(12/29) Installing libxdmcp (1.1.4-r2)
(13/29) Installing libxcb (1.15-r1)
(14/29) Installing libx11 (1.8.4-r4)
(15/29) Installing libxext (1.3.5-r2)
(16/29) Installing libxi (1.8.1-r0)
(17/29) Installing libxrender (0.9.11-r3)
(18/29) Installing libxtst (1.2.4-r2)
(19/29) Installing alsa-lib (1.2.9-r1)
(20/29) Installing brotli-libs (1.0.9-r14)
(21/29) Installing libbz2 (1.0.8-r5)
(22/29) Installing libpng (1.6.39-r3)
(23/29) Installing freetype (2.13.0-r5)
(24/29) Installing giflib (5.2.1-r4)
(25/29) Installing libjpeg-turbo (2.1.5.1-r3)
(26/29) Installing lcms2 (2.15-r2)
(27/29) Installing openjdk17-jre (17.0.8_p7-r0)
(28/29) Installing openjdk17-jmods (17.0.8_p7-r0)
(29/29) Installing openjdk17-jdk (17.0.8_p7-r0)
Executing busybox-1.36.1-r2.trigger
Executing java-common-0.5-r0.trigger
Executing ca-certificates-20230506-r0.trigger
OK: 287 MiB in 44 packages
DotNet
> apk add dotnet7-runtime
(1/10) Installing libgcc (12.2.1_git20220924-r10)
(2/10) Installing libstdc++ (12.2.1_git20220924-r10)
(3/10) Installing dotnet-host (7.0.11-r0)
(4/10) Installing dotnet7-hostfxr (7.0.11-r0)
(5/10) Installing icu-data-full (73.2-r2)
(6/10) Installing icu-libs (73.2-r2)
(7/10) Installing lttng-ust (2.13.5-r2)
(8/10) Installing xz-libs (5.4.3-r0)
(9/10) Installing libunwind (1.6.2-r3)
(10/10) Installing dotnet7-runtime (7.0.11-r0)
Executing busybox-1.36.1-r2.trigger
OK: 393 MiB in 54 packages
> apk add dotnet7-sdk
(1/18) Installing libgcc (12.2.1_git20220924-r10)
(2/18) Installing libstdc++ (12.2.1_git20220924-r10)
(3/18) Installing dotnet-host (7.0.11-r0)
(4/18) Installing dotnet7-hostfxr (7.0.11-r0)
(5/18) Installing icu-data-full (73.2-r2)
(6/18) Installing icu-libs (73.2-r2)
(7/18) Installing lttng-ust (2.13.5-r2)
(8/18) Installing xz-libs (5.4.3-r0)
(9/18) Installing libunwind (1.6.2-r3)
(10/18) Installing dotnet7-runtime (7.0.11-r0)
(11/18) Installing aspnetcore7-runtime (7.0.11-r0)
(12/18) Installing aspnetcore7-targeting-pack (7.0.11-r0)
(13/18) Installing dotnet7-apphost-pack (7.0.11-r0)
(14/18) Installing dotnet7-targeting-pack (7.0.11-r0)
(15/18) Installing dotnet7-templates (7.0.111-r0)
(16/18) Installing netstandard21-targeting-pack (7.0.111-r0)
(17/18) Installing libucontext (1.2-r2)
(18/18) Installing dotnet7-sdk (7.0.111-r0)
Executing busybox-1.36.1-r2.trigger
OK: 518 MiB in 33 packages
编译类
Golang 321MB
Rust 874MB
Golang
> apk add go
(1/13) Installing libgcc (12.2.1_git20220924-r10)
(2/13) Installing libstdc++ (12.2.1_git20220924-r10)
(3/13) Installing zstd-libs (1.5.5-r4)
(4/13) Installing binutils (2.40-r7)
(5/13) Installing libgomp (12.2.1_git20220924-r10)
(6/13) Installing libatomic (12.2.1_git20220924-r10)
(7/13) Installing gmp (6.2.1-r3)
(8/13) Installing isl26 (0.26-r1)
(9/13) Installing mpfr4 (4.2.0_p12-r0)
(10/13) Installing mpc1 (1.3.1-r1)
(11/13) Installing gcc (12.2.1_git20220924-r10)
(12/13) Installing musl-dev (1.2.4-r1)
(13/13) Installing go (1.20.8-r0)
Executing busybox-1.36.1-r2.trigger
OK: 321 MiB in 28 packages
Rust
> apk add rust
(1/17) Installing libgcc (12.2.1_git20220924-r10)
(2/17) Installing libstdc++ (12.2.1_git20220924-r10)
(3/17) Installing zstd-libs (1.5.5-r4)
(4/17) Installing binutils (2.40-r7)
(5/17) Installing libgomp (12.2.1_git20220924-r10)
(6/17) Installing libatomic (12.2.1_git20220924-r10)
(7/17) Installing gmp (6.2.1-r3)
(8/17) Installing isl26 (0.26-r1)
(9/17) Installing mpfr4 (4.2.0_p12-r0)
(10/17) Installing mpc1 (1.3.1-r1)
(11/17) Installing gcc (12.2.1_git20220924-r10)
(12/17) Installing musl-dev (1.2.4-r1)
(13/17) Installing libffi (3.4.4-r2)
(14/17) Installing xz-libs (5.4.3-r0)
(15/17) Installing libxml2 (2.11.4-r0)
(16/17) Installing llvm16-libs (16.0.6-r1)
(17/17) Installing rust (1.71.1-r0)
Executing busybox-1.36.1-r2.trigger
OK: 874 MiB in 32 packages
活了!