Skip to content

Commit 39be2cc

Browse files
authored
Escalate privileges earlier for lucene directory creation. (#720)
And chown back to 1001
1 parent 6f295d1 commit 39be2cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ RUN mkdir /app && cp /tmp/hapi-fhir-jpaserver-starter/target/ROOT.war /app/main.
2020
########### it can be built using eg. `docker build --target tomcat .`
2121
FROM bitnami/tomcat:10.1 AS tomcat
2222

23+
USER root
2324
RUN rm -rf /opt/bitnami/tomcat/webapps/ROOT && \
2425
mkdir -p /opt/bitnami/hapi/data/hapi/lucenefiles && \
26+
chown -R 1001:1001 /opt/bitnami/hapi/data/hapi/lucenefiles && \
2527
chmod 775 /opt/bitnami/hapi/data/hapi/lucenefiles
2628

27-
USER root
2829
RUN mkdir -p /target && chown -R 1001:1001 target
2930
USER 1001
3031

0 commit comments

Comments
 (0)