mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Maxim Thomas
21.47.2018 03ca49f723555e8378ab536e13b019827994d1a5
 make Dockerfile unpriveleged (#31)

1 files modified
11 ■■■■■ changed files
opendj-packages/opendj-docker/Dockerfile 11 ●●●●● patch | view | raw | blame | history
opendj-packages/opendj-docker/Dockerfile
@@ -16,6 +16,8 @@
ARG VERSION=@project_version@
ARG OPENDJ_USER="opendj"
WORKDIR /opt
RUN apt-get install -y wget unzip
@@ -29,4 +31,13 @@
  --generateSelfSignedCertificate --baseDN "$BASE_DN" -h localhost --rootUserDN "$ROOT_USER_DN" \
  --rootUserPassword "$ROOT_PASSWORD" --acceptLicense --no-prompt --doNotStart $ADD_BASE_ENTRY
RUN useradd -m -r -u 1001 -g root $OPENDJ_USER
RUN chgrp -R 0 /opt/opendj && \
    chmod -R g=u /opt/opendj
USER $OPENDJ_USER
EXPOSE $PORT $LDAPS_PORT 4444
CMD ["/opt/opendj/bin/start-ds", "--nodetach"]