A Dockerfile starter for running an app in any language as a container, with a small dependency-free Node.js 22 server inside as a working example. It is for developers who want to bring their own Dockerfile, and it includes a non-root image, clean shutdown and tests with the built-in Node.js test runner.
by Light CloudREST APIs
The only contract is the port: whatever runs in the container must listen on 0.0.0.0 and the port in PORT, which the Dockerfile defaults to 8080. The Node.js example keeps the request handler in src/app.js apart from src/server.js, so tests can start it on a random port. The first change is usually replacing src/ and the Dockerfile with your own runtime, such as a python:3.12-slim or golang base image. Light Cloud builds the image and redeploys on each push to your copy, so Dockerfile edits go live with the next push, and the repo ships a .mcp.json for the Light Cloud MCP server.
Replace src/ with your code and rewrite the Dockerfile for your runtime: a base image such as python:3.12-slim, your install and build steps, and a CMD that starts a server on 0.0.0.0 and the port in PORT.
The one in the PORT environment variable. Light Cloud sets it, and the example falls back to 8080 when it is not set.
The container runs node as process 1, which ignores SIGTERM unless the app handles it. src/server.js closes the server on SIGTERM so it exits cleanly instead of being killed.
Add a package.json and lockfile, then in the Dockerfile copy them and run npm ci --omit=dev before COPY src ./src, so the install layer is cached between builds.
Yes. It has no Light Cloud code: build it with docker build, push the image to a registry and run it on any container host with PORT set.
Start a Go JSON API on the standard library alone, with logs, tests and a Dockerfile
Start a C# minimal API on .NET 8 with settings, CORS, health check and Docker set up
Start a Node.js REST API with Express, CORS, JSON errors and tests already wired up