Sign inSign up

emrekgn/spring-cloud-config-server

By emrekgn

Updated 10 months ago

A minimal (~80MB), unofficial Docker image of Spring Cloud Config Server

Image
Integration & delivery
Web servers
Databases & storage
0

1.7K

emrekgn/spring-cloud-config-server repository overview

Overview

A minimal Spring Cloud Config Server image (~80MB) tailored for small footprints without losing Spring Boot capabilities.

Quickstart

# Run with defaults (Git backend pointing to the sample repo)
docker run --rm -p 8888:8888 emrekgn/spring-cloud-config-server:latest

# Override Git repository and branch/tag
docker run --rm -p 8888:8888 \
  -e CONFIG_GIT_URI=https://github.com/your-org/your-configs \
  -e CONFIG_GIT_DEFAULT_LABEL=prod \
  emrekgn/spring-cloud-config-server:latest

# Change server port and activate extra profiles
docker run --rm -p 9090:9090 \
  -e SERVER_PORT=9090 \
  -e SPRING_PROFILES_ACTIVE=native,git \
  emrekgn/spring-cloud-config-server:latest

# Mount an external application.yml into the container
docker run --rm -p 8888:8888 \
  -v "$(pwd)/config/application.yml:/opt/config-server/config/application.yml:ro" \
  emrekgn/spring-cloud-config-server:latest

# Use native (filesystem) backend instead of Git
docker run --rm -p 8888:8888 \
  -e SPRING_PROFILES_ACTIVE=native \
  -e SPRING_CLOUD_CONFIG_SERVER_NATIVE_SEARCH_LOCATIONS=file:/opt/config-server/native \
  -v "$(pwd)/native-config:/opt/config-server/native:ro" \
  emrekgn/spring-cloud-config-server:latest

Docker image tags follow the pattern java<JAVA_VERSION>-boot<SPRING_BOOT_VERSION> (for example java21-boot4.0.0 or java17-boot3.5.8). Choose the combo that matches the runtime you need; each one is built, tested, smoke-checked, and pushed by the workflow.

Configuration

Override the environment variables below to point at your own configuration Git repository or change runtime behavior.

VariableDefaultPurpose
SPRING_PROFILES_ACTIVEgitSpring profile(s) to load
SERVER_PORT8888HTTP port Config Server listens on
CONFIG_GIT_URIhttps://github.com/spring-cloud-samples/config-repoSource repository for configuration
CONFIG_GIT_DEFAULT_LABELmainGit branch/tag
CONFIG_GIT_SEARCH_PATHS(empty)Comma-separated list of search paths
CONFIG_GIT_CLONE_ON_STARTtrueEnsure repo is cloned before serving requests
CONFIG_GIT_SKIP_SSL_VALIDATIONfalseSkip SSL validation for Git
CONFIG_GIT_FORCE_PULLfalseForce pull on start
CONFIG_GIT_USERNAME(empty)Username for private repositories
CONFIG_GIT_PASSWORD(empty)Password/token for private repositories
JAVA_OPTS(empty)Extra JVM flags (e.g. -Xmx256m)

Any additional Spring configuration can be supplied via environment variables, command-line arguments (JAVA_OPTS), or by mounting a custom application.yml into /opt/config-server/config.

Health check

Actuator endpoints (/actuator/health, /actuator/info) are exposed for quick health checks, making the container drop-in ready for Kubernetes, Docker Compose, or any registry deployment.

curl http://localhost:8888/actuator/health

Tag summary

Content type

Image

Digest

sha256:b83ea150a

Size

77.2 MB

Last updated

10 months ago

docker pull emrekgn/spring-cloud-config-server