Added option to configure jvm parameter of docker image

This commit is contained in:
Sebastian Sdorra
2020-06-08 10:55:56 +02:00
parent d5e3279032
commit 073d317c9f
3 changed files with 10 additions and 1 deletions

View File

@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Added
- Option to configure jvm parameter of docker container with env JAVA_OPTS or with arguments
### Fixed
- Fixes configuration of jetty listener address with system property `jetty.host` ([#1173](https://github.com/scm-manager/scm-manager/pull/1173), [#1174](https://github.com/scm-manager/scm-manager/pull/1174))

View File

@@ -47,6 +47,7 @@ RUN set -x \
&& addgroup -S -g 1000 scm \
&& adduser -S -s /bin/false -G scm -h ${SCM_HOME} -D -H -u 1000 scm \
&& mkdir -p ${SCM_HOME} ${CACHE_DIR} \
&& chmod +x /opt/scm-server/bin/scm-server \
&& chown scm:scm ${SCM_HOME} ${CACHE_DIR}
# copy mercurial installation
@@ -58,4 +59,4 @@ VOLUME ["${SCM_HOME}", "${CACHE_DIR}"]
EXPOSE 8080
USER scm
CMD [ "java", "-cp", "/etc/scm:/opt/scm-server/lib/*", "-Djava.awt.headless=true", "-Dlogback.configurationFile=logging.xml", "sonia.scm.server.ScmServerDaemon" ]
ENTRYPOINT [ "/opt/scm-server/bin/scm-server" ]

View File

@@ -0,0 +1,6 @@
#!/bin/sh
exec java -cp "/etc/scm:/opt/scm-server/lib/*" \
-Djava.awt.headless=true \
-Dlogback.configurationFile=logging.xml \
$JAVA_OPTS $* \
sonia.scm.server.ScmServerDaemon