Sign inSign up

embarkx/hello-spring

By embarkx

•Updated 10 months ago

Simple Spring Boot demo app for Docker, Kubernetes, and DevOps learning.

Image
Developer tools
4

2.1K

embarkx/hello-spring repository overview

⁠Hello Spring – Production-Ready Spring Boot Demo

A lightweight Spring Boot demo application designed for Docker, Kubernetes, and DevOps learning. This container returns runtime metadata such as environment variables and container hostname, making it ideal for teaching microservices, scaling, service discovery, and container networking fundamentals.


⁠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-spring:latest

Run the container:

docker run -p 8080:8080 embarkx/hello-spring

Visit:

http://localhost:8080/⁠


⁠API Response Format

The application exposes a root endpoint (/) returning JSON similar to:

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

This helps demonstrate:

  • How environment variables are injected into containers
  • How container metadata changes between instances
  • Hostname behavior in Docker and Kubernetes

⁠Environment Variables

VariableDefaultDescription
ENV_VALUENo env setMessage injected from environment

Example:

docker run -p 8080:8080 \
  -e ENV_VALUE="Running in Docker" \
  embarkx/hello-spring

⁠Exposed Ports

8080

⁠Docker Compose Example

services:
  hello-spring:
    image: embarkx/hello-spring:stable
    ports:
      - "8080:8080"
    environment:
      ENV_VALUE: "Hello from Docker Compose"

⁠Version History

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

⁠Base Image Details

  • Base JDK: Eclipse Temurin OpenJDK 17
  • Framework: Spring Boot 3.x
  • Runs as non-root user
  • No shell access inside container

⁠Advanced Run Options

Detached mode:

docker run -d -p 8080:8080 embarkx/hello-spring

Custom port:

docker run -p 9090:9090 \
  -e SERVER_PORT=9090 \
  embarkx/hello-spring

⁠Build Instructions

docker build -t embarkx/hello-spring .

⁠Architectures

  • linux/amd64

⁠Support

This image is maintained as part of the EmbarkX DevOps Learning Series. For issues or improvement requests, please use the GitHub issue tracker.


⁠Source Code

https://github.com/EmbarkXOfficial⁠

Tag summary

Content type

Image

Digest

sha256:40dbaf543…

Size

218.8 MB

Last updated

10 months ago

docker pull embarkx/hello-spring