Sign inSign up

embarkx/hello-node

By embarkx

•Updated 9 months ago

A lightweight Express.js application designed for Docker, Kubernetes, and DevOps learning.

Image
0

2.2K

embarkx/hello-node repository overview

⁠Hello Node – Production-Ready Node.js Demo App

A lightweight Express.js application designed for Docker, Kubernetes, and DevOps learning. This container exposes runtime metadata such as environment variables and container hostname — ideal for teaching microservices, scaling, load balancing, and container networking.


⁠Available Tags

TagDescription
latestMost updated version
v1.0.0Stable release used in the course
stableSafest version for beginners

⁠Quick Start

Pull the image:

docker pull embarkx/hello-node:latest

Run the container:

docker run -p 3000:3000 embarkx/hello-node

Visit:

http://localhost:3000/⁠


⁠API Response Format

The root endpoint (/) returns JSON:

{
  "message": "Hello from Simple App (Node)",
  "env": "<value of ENV_VALUE>",
  "container": "<container-hostname>"
}

This demonstrates:

  • Environment variable injection inside Node containers
  • Metadata variation per container instance
  • HOSTNAME behavior inside Docker and Kubernetes

⁠Environment Variables

VariableDefaultDescription
ENV_VALUENo env setCustom message from environment
PORT3000Port the application listens on

Example:

docker run -p 5000:5000 \
  -e PORT=5000 \
  -e ENV_VALUE="Running in Docker" \
  embarkx/hello-node

⁠Exposed Ports

3000

⁠Docker Compose Example

services:
  hello-node:
    image: embarkx/hello-node:stable
    ports:
      - "3000:3000"
    environment:
      ENV_VALUE: "Hello from Docker Compose"
      PORT: 3000

⁠Version History

  • v1.0.0 – Initial stable release
  • latest – Same as v1.0.0
  • stable – Recommended for learners

⁠Base Image Details

  • Base Image: node:18-slim
  • Framework: Express.js
  • Production install with npm for minimal footprint
  • No shell access inside container
  • Non-root runtime configuration compatible with Kubernetes

⁠Advanced Run Options

Detached mode:

docker run -d -p 3000:3000 embarkx/hello-node

Change port:

docker run -p 4000:4000 \
  -e PORT=4000 \
  embarkx/hello-node

⁠Build Instructions

docker build -t embarkx/hello-node .

⁠Architectures

  • linux/amd64

⁠Source Code:

https://github.com/EmbarkXOfficial

Tag summary

Content type

Image

Digest

sha256:2b2471e4c…

Size

78 MB

Last updated

9 months ago

docker pull embarkx/hello-node