<<<<<<< HEAD
A docker image of Spring Cloud Config Server.
docker run -it --name=spring-cloud-config-server \
-p 8888:8888 \
-v </path/to/config>:/config \
hyness/spring-cloud-config-server
-p 8888
Server port-v /config
Mounted configuration
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.
# Using a mounted config Directory
docker run -it -p 8888:8888 \
-v /path/to/config/dir:/config \
hyness/spring-cloud-config-server
# Using a mounted application.yml
docker run -it -p 8888:8888 \
-v /path/to/application.yml:/config/application.yml \
hyness/spring-cloud-config-server
# Configure through environment variables without a configuration file
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
# Configure through command line arguments without a configuration file
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 3 backends to choose from...
# Github example
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
# Local git repo example
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 \
hyness/spring-cloud-config-server
=======
195737485d7a34f65cb4d8f085a6c15b4d133f38