Sign inSign up

pplx/hello-app

By pplx

•Updated over 1 year ago

An application providing a simple welcome service with basic health monitoring capabilities.

Image
Web servers
0

1.1K

pplx/hello-app repository overview

⁠Hello App - Docker Documentation

🐳 Docker Hub Repository: pplx/hello-app

A containerized Node.js Express application providing a simple welcome service with health monitoring capabilities.

ā šŸ“¦ Docker Image Information

  • Base Image: node:24-alpine
  • Exposed Port: 8080
  • Image Size: ~50MB (Alpine-based)
  • Architecture: Multi-platform (linux/amd64, linux/arm64)

ā šŸš€ Quick Start with Docker

⁠Pull and Run from Docker Hub
# Pull the latest image
docker pull pplx/hello-app

# Run the container
docker run -d -p 8080:8080 --name hello-app pplx/hello-app

# Access the application
curl http://localhost:8080
⁠Run with Custom Configuration
# Run with custom name
docker run -d -p 8080:8080 -e NAME="Docker User" --name hello-app pplx/hello-app

# Run with custom port mapping
docker run -d -p 3000:8080 --name hello-app pplx/hello-app

ā šŸ”§ Environment Variables

VariableDescriptionDefault ValueExample
PORTInternal container port8080PORT=8080
NAMECustom greeting name"" (empty)NAME="John Doe"

ā šŸ—ļø Building from Source

⁠Prerequisites
  • Docker Desktop or Docker Engine
  • Git (to clone the repository)
⁠Build Steps
  1. Clone the repository

    git clone https://github.com/VishwaGullapalli/hello-app.git
    cd hello-app
    
  2. Build the Docker image

    # Build with default tag
    docker build -t hello-app .
    
    # Build with custom tag
    docker build -t myusername/hello-app:v1.0.0 .
    
  3. Run the built image

    docker run -p 8080:8080 hello-app
    

ā šŸ“‹ Dockerfile Explanation

FROM node:24-alpine    # Lightweight Alpine Linux base with Node.js 24
EXPOSE 8080           # Expose port 8080 for external access
WORKDIR /app          # Set working directory
COPY package*.json ./  # Copy package files for dependency installation
RUN npm install      # Install dependencies
COPY . .             # Copy application source code
ENV PORT=8080        # Set default port
ENV NAME=""          # Set default empty name
CMD ["npm", "start"] # Start the application

ā šŸ” Health Monitoring

The container includes a built-in health check endpoint:

# Check application health
curl http://localhost:8080/health

# Expected response:
# {"status":"OK","message":"Application is running"}
⁠Docker Health Check

Add health check to your docker run command:

docker run -d \
  --name hello-app \
  --health-cmd="curl -f http://localhost:8080/health || exit 1" \
  --health-interval=30s \
  --health-retries=3 \
  --health-start-period=5s \
  -p 8080:8080 \
  pplx/hello-app

ā šŸ“Š Container Management

⁠Basic Commands
# View running containers
docker ps

# View container logs
docker logs hello-app

# Execute commands in running container
docker exec -it hello-app sh

# Stop the container
docker stop hello-app

# Remove the container
docker rm hello-app

# Remove the image
docker rmi pplx/hello-app

ā šŸ”§ Troubleshooting

⁠Common Issues
  1. Port Already in Use

    # Use different port mapping
    docker run -p 8081:8080 username/hello-app
    
  2. Container Won't Start

    # Check logs
    docker logs hello-app
    
    # Check if image exists
    docker images | grep hello-app
    
  3. Cannot Access Application

    # Verify port mapping
    docker port hello-app
    
    # Check container status
    docker ps -a
    

ā šŸ“ž Support

ā šŸ“ Version History

VersionDateChanges
v1.0.02025-06-01Initial release

🐳 Ready to containerize your applications? Pull this image and see Docker in action!

Tag summary

Content type

Image

Digest

sha256:bd862ba79…

Size

55.9 MB

Last updated

over 1 year ago

docker pull pplx/hello-app