Skip to content

Commit eba8fcd

Browse files
authored
nats: describe scratch default and alpine variants accurately (#2710)
The default image is built FROM scratch and is smaller than -alpine, and its config lives at /nats-server.conf rather than /etc/nats/. Signed-off-by: Byron Ruth <byron@nats.io>
1 parent 402ab9c commit eba8fcd

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎nats/variant-alpine.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## `%%IMAGE%%:<version>-alpine`
2+
3+
This image is based on the popular [Alpine Linux project](https://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Unlike the default image, it includes a shell and the `apk` package manager, at the cost of a larger image. The default configuration is at `/etc/nats/nats-server.conf`.
4+
5+
This variant uses [musl libc](https://musl.libc.org), but `nats-server` itself is statically linked, so this rarely matters unless you add other software on top. To keep the image small, it is uncommon for additional related tools (such as `git` or `bash`) to be included; add what you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar).

‎nats/variant.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Image Variants
2+
3+
The `%%IMAGE%%` images come in many flavors, each designed for a specific use case.
4+
5+
## `%%IMAGE%%:<version>`
6+
7+
This is the default image. If you are unsure about what your needs are, you probably want to use this one. It is built `FROM scratch` and contains only the statically linked `nats-server` binary and a default configuration at `/nats-server.conf`, which makes it the smallest variant. It has no shell or other tools, so use one of the other variants if you need to `exec` into the container or install additional software.

0 commit comments

Comments
 (0)