1. Images & Charts
  2. node
node

node

Dev
Updated 17 hours ago

Node Overview

Secure your stack with a hardened Node image freshly-built by Minimus. Minimus images always include the most up-to-date package version for all packages and dependencies contained in the image.


Node.js is a JavaScript runtime used to run JavaScript code on the server side to build scalable network applications.


Try It Out

To take the Minimus Node image for a test run, we will create a simple web application with some JavaScript and run it with our Minimus Node container.

In your project directory, save the following JavaScript code in a file named hello-minimus-node.js:

const http = require('node:http');

const listener = (req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/html' });
  res.end(`
    <!DOCTYPE html>
    <html>
    <head>
      <title>Minimus Node Server</title>
      <style>
        body {
          margin: 0;
          padding: 0;
          background-color: #ffffff;
          font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
          display: flex;
          justify-content: center;
          align-items: center;
          height: 100vh;
        }
        h1 {
          font-size: 72px;
          color: #4285f4;
          text-align: center;
          text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        }
      </style>
    </head>
    <body>
      <h1>Hello from Minimus Node</h1>
    </body>
    </html>
  `);
};

const server = http.createServer(listener);
server.listen(3000);

console.log('Server running at http://127.0.0.1:3000/');

Next, run the container and mount your JavaScript:

docker run -p 3000:3000 -d --name minimus-node \
    -v $(pwd)/hello-minimus-node.js:/home/hello_world/hello-minimus-node.js \
    reg.mini.dev/node \
    /home/hello_world/hello-minimus-node.js

Visit the landing page at http://localhost:3000. It should say "Hello from Minimus Node". If you're working in a VM, run curl ifconfig.me to look up your external IP and substitute it like this: http://{IP}:3000.


Technical Considerations

The Node image provided by Minimus is a slim, security-hardened alternative to the public image from Docker Hub. The images are largely interchangeable, with a few differences as noted below.

Node built by Minimus:

  1. Runs as non-root by default for a security-first approach that protects against privilege escalation attacks. The public image runs as root.
  2. The image default working directory is /app. The public image working directory defaults to the root directory.
  3. Drill down on the version specification tab to see the default user, listening ports, entrypoint, volumes, environment variables, etc.

The Payoff

A hardened, minimal image that will remain more secure for the long run and accrue vulnerabilities at a slower rate.


Terms & Info

Trademark

This catalog is published by Minimus. All product names, logos, and marks, other than those belonging to Minimus, shown are owned by their respective rights holders and appear here only to identify the open source software each image contains. Minimus claims no ownership of those marks and implies no affiliation with, endorsement by, certification by, or sponsorship by any rights holder.

Disclaimer

Images are provided "as-is" without warranty of any kind. "Hardened" refers to the security configuration applied at the time of build and does not constitute a guarantee of ongoing security or absence of vulnerabilities. The free tier is provided without support, SLA, or guaranteed patching timelines. Security updates may be applied to paid subscriptions before or instead of free tier images. By pulling or using any image you agree to our Terms of Use.