Skip to content

Commit

Permalink
We don't need a home directory...
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher committed Mar 2, 2023
1 parent 8614788 commit 0fc2465
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ RUN if [ "$TARGETARCH" = "arm64" ] ; then TINI_URL="${TINI_URL}-arm64" TINI_SHA=
&& echo "${TINI_SHA} /usr/bin/tini" | sha256sum -c \
&& chmod +rx /usr/bin/tini

RUN useradd -m -d /openmrs/home -u 1001 openmrs
RUN useradd -u 1001 openmrs

RUN sed -i '/Connector port="8080"/a URIEncoding="UTF-8" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>"' \
/usr/local/tomcat/conf/server.xml \
Expand All @@ -139,9 +139,7 @@ COPY --from=dev /openmrs/distribution/openmrs_core/openmrs.war /openmrs/distribu

EXPOSE 8080

# Run as non-root user using Bitnami approach, see e.g.
# https://github.com/bitnami/containers/blob/6c8f10bbcf192ab4e575614491abf10697c46a3e/bitnami/tomcat/8.5/debian-11/Dockerfile#L54
USER 1001
USER openmrs

ENTRYPOINT ["/usr/bin/tini", "--"]

Expand Down

0 comments on commit 0fc2465

Please sign in to comment.