Skip to content

Commit 1a91eec

Browse files
authored
Add root group permission to the Docker /opt/openidm directory (#112)
1 parent 19f2054 commit 1a91eec

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM eclipse-temurin:21-jre-jammy
22

3-
MAINTAINER Open Identity Platform Community <open-identity-platform-openidm@googlegroups.com>
3+
LABEL org.opencontainers.image.authors="Open Identity Platform Community"
44

55
ENV USER="openidm"
66
ENV OPENIDM_OPTS="-server -XX:+UseContainerSupport --add-exports java.base/com.sun.jndi.ldap=ALL-UNNAMED -Dlogback.configurationFile=conf/logging-config.groovy"
@@ -18,10 +18,10 @@ RUN apt-get update \
1818
&& unzip openidm-*.zip && rm -rf *.zip \
1919
&& apt-get remove -y --purge unzip \
2020
&& rm -rf /var/lib/apt/lists/* \
21-
&& groupadd $USER \
22-
&& useradd -m -r -u 1001 -g $USER $USER \
21+
&& useradd -m -r -u 1001 -g root $USER \
2322
&& install -d -o $USER /opt/openidm \
24-
&& chown -R $USER:$USER /opt/openidm \
23+
&& chown -R $USER:root /opt/openidm \
24+
&& chgrp -R 0 /opt/openidm \
2525
&& chmod -R g=u /opt/openidm \
2626
&& chmod +x /opt/openidm/*.sh
2727

Dockerfile-alpine

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM openjdk:8-jre-alpine
22

3-
MAINTAINER Open Identity Platform Community <open-identity-platform-openidm@googlegroups.com>
3+
LABEL org.opencontainers.image.authors="Open Identity Platform Community"
44

55
ENV USER="openidm"
66
ENV OPENIDM_OPTS="-server -XX:+UseContainerSupport -Dlogback.configurationFile=conf/logging-config.groovy"
@@ -19,10 +19,10 @@ RUN apk add --update --no-cache --virtual builddeps curl unzip \
1919
&& bash -c 'if [ ! -z "$VERSION" ] ; then rm -rf ./*.zip ; curl -L https://github.com/OpenIdentityPlatform/OpenIDM/releases/download/$VERSION/openidm-$VERSION.zip --output openidm-$VERSION.zip ; fi' \
2020
&& unzip openidm-*.zip && rm -rf *.zip \
2121
&& apk del unzip \
22-
&& addgroup -S $USER \
23-
&& adduser -S -u 1001 -G $USER $USER \
22+
&& adduser -S -u 1001 -G root $USER \
2423
&& install -d -o $USER /opt/openidm \
25-
&& chown -R $USER:$USER /opt/openidm \
24+
&& chown -R $USER:root /opt/openidm \
25+
&& chgrp -R 0 /opt/openidm \
2626
&& chmod -R g=u /opt/openidm \
2727
&& chmod +x /opt/openidm/*.sh
2828

0 commit comments

Comments
 (0)