hyness / spring-cloud-config-server

Docker build of the spring-cloud-config-server
Apache License 2.0
74 stars 54 forks source link

Unable to change the SERVER_PORT value to a different value #18

Closed norman-abramovitz closed 4 years ago

norman-abramovitz commented 4 years ago

I tried --server.port=8080 in the entrypoint.sh script and

server: port: 8080

in the application.yml and neither changes the value displayed in the config server log output.

hyness commented 4 years ago

The entrypoint script is not intended to be modified inside the docker image. If you wish to run the server on a different port like 8080, you need to map the port you choose to the port from the entrypoint script

Here is how you would do it, using one of README examples

docker run -it -p 8080:8888 \
      hyness/spring-cloud-config-server \
      --spring.cloud.config.server.git.uri=https://github.com/spring-cloud-samples/config-repo