A docker image of Spring Cloud Config Server.
2.2.3.RELEASE-jdk8,2.2-jdk8,jdk8,2.2.3-RELEASE,2.2,latest2.2.3.RELEASE-jdk11,2.2-jdk11,jdk112.2.3.RELEASE-jdk14,2.2-jdk14,jdk14
docker run -it --name=spring-cloud-config-server \
-p 8888:8888 \
-v </path/to/config>:/config \
hyness/spring-cloud-config-server
-p 8888Server port-v /configMounted configuration
JAVA_OPTSSpecify VM Options or System Properties
Spring Cloud Config Server is a normal Spring Boot application, it can be configured through all the ways a Spring Boot application can be configured. You may use environment variables or you can mount configuration in the provided volume. The configuration file must be named application and may be a properties or yaml file. See the Spring Boot documentation for further information on how to use and configure Spring Boot.
docker run -it -p 8888:8888 \
-v /path/to/config/dir:/config \
hyness/spring-cloud-config-server
docker run -it -p 8888:8888 \
-v /path/to/application.yml:/config/application.yml \
hyness/spring-cloud-config-server
docker run -it -p 8888:8888 \
-e SPRING_CLOUD_CONFIG_SERVER_GIT_URI=https://github.com/spring-cloud-samples/config-repo \
hyness/spring-cloud-config-server
docker run -it -p 8888:8888 \
-e JAVA_OPTS=-Dspring.cloud.config.server.git.uri=https://github.com/spring-cloud-samples/config-repo \
hyness/spring-cloud-config-server
docker run -it -p 8888:8888 \
hyness/spring-cloud-config-server \
--spring.cloud.config.server.git.uri=https://github.com/spring-cloud-samples/config-repo
$ curl http://localhost:8888/foo/development
Spring Cloud Config Server requires that you configure a backend to serve your configuration files. There are currently 6 backends to choose from...
docker run -it -p 8888:8888 \
-e SPRING_CLOUD_CONFIG_SERVER_GIT_URI=https://github.com/spring-cloud-samples/config-repo \
hyness/spring-cloud-config-server
docker run -it -p 8888:8888 \
-v /path/to/config/files/dir:/config \
-e SPRING_CLOUD_CONFIG_SERVER_GIT_URI=file:/config/my-local-git-repo \
hyness/spring-cloud-config-server
docker run -it -p 8888:8888 \
-v /path/to/config/files/dir:/config \
-e SPRING_PROFILES_ACTIVE=native \
hyness/spring-cloud-config-server
docker run -it -p 8888:8888 \
-e SPRING_PROFILES_ACTIVE=vault \
-e SPRING_CLOUD_CONFIG_SERVER_VAULT_HOST=localhost \
-e SPRING_CLOUD_CONFIG_SERVER_VAULT_TOKEN=00000000-0000-0000-0000-000000000000 \
hyness/spring-cloud-config-server
docker run -it -p 8888:8888 \
-e SPRING_PROFILES_ACTIVE=awss3 \
-e SPRING_CLOUD_CONFIG_SERVER_AWSS3_REGION=us-east-1 \
-e SPRING_CLOUD_CONFIG_SERVER_AWSS3_BUCKET=bucket \
hyness/spring-cloud-config-server
docker run -it -p 8888:8888 \
-e SPRING_PROFILES_ACTIVE=redis \
-e SPRING_REDIS_HOST=localhost
-e SPRING_REDIS_PORT=6379
hyness/spring-cloud-config-server
docker run -it -p 8888:8888 \
-e SPRING_PROFILES_ACTIVE=jdbc \
-e SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/database_name \
-e SPRING_DATASOURCE_USERNAME=myuser \
-e SPRING_DATASOURCE_PASSWORD=mypassword \
hyness/spring-cloud-config-server
- Firebird
- MariaDB
- MS-SQL
- Postgres
See the docker-compose examples for more details
The Spring Boot actuator is enabled by default. Spring Boot provides configuration options for managing its configuration. The actuator can be disabled entirely by including the no-actuator profile
Spring Security can be enabled through the security profile.
docker run -it -p 8888:8888 \
-e SPRING_PROFILES_ACTIVE=security \
-e SPRING_SECURITY_USER_NAME=myuser -e SPRING_SECURITY_USER_PASSWORD=mypassword \
hyness/spring-cloud-config-server