-
Notifications
You must be signed in to change notification settings - Fork 0
Debugging
Runtime-Node strictly enforces a distroless guarantee: there is no /bin/sh, bash, or ash included in the image.
If you attempt to run docker exec -it <container_name> /bin/sh, you will receive an executable file not found in $PATH error. This is a security feature, not a bug. By eliminating the shell, we eliminate Remote Code Execution (RCE) escalation paths.
-
Use Application-Level Logging (Recommended) Your application should be treated as an immutable black box. Output all necessary telemetry, errors, and access logs to
stdoutandstderrusingconsole.log()or a structured logger like Pino/Winston. Docker automatically captures this stream:docker logs -f my_running_container
-
The Temporary Swap Method (For Deep Debugging) If you have a persistent file-system bug or path issue that you absolutely must investigate interactively, temporarily swap the base image in your Dockerfile.
Change this:
FROM runtimenode/runtime-node:v<major>.<minor>.<patch>+node<node_version>To this:
FROM node:<node_version>-alpine3.23Rebuild the image, docker exec into it, find the bug, fix your code, and switch back to runtimenode for your production deployment.
Runtime Node • Secure, Distroless, Multi-Arch Node.js Runtime
Released under the Apache 2.0 License.
Star on GitHub • Docker Hub • GitHub Container Registry (GHCR) • Report an Issue