Skip to content

Commit 0adb477

Browse files
authored
Merge pull request #276 from LaurentGoderre/alpine-docs
Added the alpine docs to the readme
2 parents aaeb981 + e89b57f commit 0adb477

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,32 @@ on their system. It, by design, has a large number of extremely common Debian
122122
packages. This reduces the number of packages that images that derive from it
123123
need to install, thus reducing the overall size of all images on your system.
124124

125+
## `node:alpine`
126+
127+
This image is based on the popular
128+
[Alpine Linux project](http://alpinelinux.org), available in
129+
[the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is
130+
much smaller than most distribution base images (~5MB), and thus leads to much
131+
slimmer images in general.
132+
133+
This variant is highly recommended when final image size being as small as
134+
possible is desired. The main caveat to note is that it does use
135+
[musl libc](http://www.musl-libc.org) instead of
136+
[glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain
137+
software might run into issues depending on the depth of their libc
138+
requirements. However, most software doesn't have an issue with this, so this
139+
variant is usually a very safe choice. See
140+
[this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897)
141+
for more discussion of the issues that might arise and some pro/con comparisons
142+
of using Alpine-based images.
143+
144+
To minimize image size, it's uncommon for additional related tools
145+
(such as `git` or `bash`) to be included in Alpine-based images. Using this
146+
image as a base, add the things you need in your own Dockerfile
147+
(see the [`alpine` image description](https://hub.docker.com/_/alpine/) for
148+
examples of how to install packages if you are unfamiliar).
149+
150+
125151
## `node:onbuild`
126152

127153
This image makes building derivative images easier. For most use cases, creating

0 commit comments

Comments
 (0)