Modify Dockerfile to run as non-root
@@ -49,6 +49,12 @@ COPY log4j2.properties .
COPY database.properties.tmpl .
COPY docker-entrypoint.sh .
+RUN groupadd -r --gid 201 scalardb && \
+ useradd -r --uid 201 -g scalardb scalardb
+RUN chown -R scalardb:scalardb /scalardb/server
+
+USER 201
+
ENV JAVA_OPT_MAX_RAM_PERCENTAGE '70.0'
ENV SCALARDB_SERVER_OPTS -Dlog4j.configurationFile=file:log4j2.properties
