A minimal (~80MB), unofficial Docker image of Spring Cloud Config Server
1.7K
A minimal Spring Cloud Config Server image (~80MB) tailored for small footprints without losing Spring Boot capabilities.
# 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.
Override the environment variables below to point at your own configuration Git repository or change runtime behavior.
| Variable | Default | Purpose |
|---|---|---|
SPRING_PROFILES_ACTIVE | git | Spring profile(s) to load |
SERVER_PORT | 8888 | HTTP port Config Server listens on |
CONFIG_GIT_URI | https://github.com/spring-cloud-samples/config-repo | Source repository for configuration |
CONFIG_GIT_DEFAULT_LABEL | main | Git branch/tag |
CONFIG_GIT_SEARCH_PATHS | (empty) | Comma-separated list of search paths |
CONFIG_GIT_CLONE_ON_START | true | Ensure repo is cloned before serving requests |
CONFIG_GIT_SKIP_SSL_VALIDATION | false | Skip SSL validation for Git |
CONFIG_GIT_FORCE_PULL | false | Force 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.
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
Content type
Image
Digest
sha256:b83ea150a…
Size
77.2 MB
Last updated
10 months ago
docker pull emrekgn/spring-cloud-config-server