Skip to content

Commit b4780a1

Browse files
authored
Explain why ca-certificates is required in the Node Dockerfile template (#849)
* Explain why ca-certificates is required in the Node Dockerfile template The previous comment ("enables TLS/SSL for securely fetching dependencies") implied this is generic Docker hygiene that could be skipped to shave layers. That framing is misleading: @livekit/rtc-node ships a native Rust core that reads the system trust store via rustls-tls-native-roots, not Node's bundled CA roots. node:22-slim doesn't ship /etc/ssl/certs/ca-certificates.crt, so without ca-certificates Room.connect() fails with the misleading "failed to retrieve region info" error. Rewrite the in-template comment to name the cause so a developer trimming the image knows the line is load-bearing. No functional change. * Tighten ca-certificates comment * Restore TLS context and --no-install-recommends note; drop version-specific image name
1 parent 1a500d8 commit b4780a1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

pkg/agentfs/examples/node.Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ FROM node:${NODE_VERSION}-slim AS base
1111
ENV PNPM_HOME="/pnpm"
1212
ENV PATH="$PNPM_HOME:$PATH"
1313

14-
# Install required system packages and pnpm, then clean up the apt cache for a smaller image
15-
# ca-certificates: enables TLS/SSL for securely fetching dependencies and calling HTTPS services
16-
# --no-install-recommends keeps the image minimal
14+
# Install ca-certificates (the system CA bundle used for TLS), then clean
15+
# the apt cache. Required by the LiveKit SDK: the native Rust core reads
16+
# the system trust store at runtime, which the slim base image doesn't ship.
17+
# --no-install-recommends keeps the image minimal.
1718
RUN apt-get update -qq && apt-get install --no-install-recommends -y ca-certificates && rm -rf /var/lib/apt/lists/*
1819

1920
# Pin pnpm version for reproducible builds

0 commit comments

Comments
 (0)