Skip to content

Commit

Permalink
Updated Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Mohan E <[email protected]>
  • Loading branch information
Mohanraj209 authored Sep 2, 2024
1 parent 0ec3fa1 commit ffd5af6
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions kernel/kernel-config-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ RUN apt-get -y update \
# change permissions of file inside working dir
&& chown -R ${container_user}:${container_user} /home/${container_user}

ADD execute-jar.sh execute-jar.sh
#ADD execute-jar.sh execute-jar.sh

RUN chmod 777 execute-jar.sh
#RUN chmod 777 execute-jar.sh

# select container user for all tasks
USER ${container_user_uid}:${container_user_gid}
Expand All @@ -78,22 +78,5 @@ COPY ./target/kernel-config-server-*.jar kernel-config-server.jar

EXPOSE 51000

# Set environment variables to override bootstrap.properties
##
# Uncomment spring.profiles.active and spring.cloud.config.server.native.search-locations for # connecting to local file system for configuration.
ENV spring.profiles.active=native
ENV spring.cloud.config.server.native.search-locations=file:///var/lib/config_repo
# Server would return a HTTP 404 status, if the application is not found.By default, this flag is set to true.
ENV spring.cloud.config.server.accept-empty=true
#Spring Cloud Config Server makes a clone of the remote git repository and if somehow the local copy gets
#dirty (e.g. folder content changes by OS process) so Spring Cloud Config Server cannot update the local copy
#from remote repository. For Force-pull in such case, we are setting the flag to true.
ENV spring.cloud.config.server.git.force-pull=false
# Setting up refresh rate to 5 seconds so that config server will check for updates in Git repo after every one minute,
#can be lowered down for production.
ENV spring.cloud.config.server.git.refreshRate=0
# adding provision to clone on start of server instead of first request
ENV spring.cloud.config.server.git.cloneOnStart=false

#CMD ./execute-jar.sh
CMD java -jar kernel-config-server.jar

0 comments on commit ffd5af6

Please sign in to comment.