This repository provides a simple container image built with Python running on Alpine Linux. The container dynamically generates an index.html page displaying its name, IP address, and current time. This image is intended for demonstration and testing purposes.
To start the container using Docker, run:
docker run -d -p 8080:80 ghcr.io/jlnhnng/hello-world:latestThis will launch the container in detached mode (-d), mapping port 8080 on the host to port 80 inside the container.
Deploy the container in a Docker Swarm environment with the following command:
docker stack deploy -c - hello-world-stack <<EOF
version: '3.8'
services:
hello-world-service:
image: ghcr.io/jlnhnng/hello-world:latest
ports:
- "8080:80"
deploy:
replicas: 1
EOFThis creates a Docker stack with a service named hello-world-service, running one replica of the container.
Deploy the container in a Kubernetes cluster using the following command:
kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
name: hello-world
spec:
containers:
- name: hello-world
image: ghcr.io/jlnhnng/hello-world:latest
ports:
- containerPort: 80
EOFThis creates a Kubernetes Pod named hello-world, running the container and exposing port 80 inside the pod.
This container is for testing, debugging, and network visibility demos.