AAF Services non root, all platforms
[aaf/authz.git] / auth / docker / Dockerfile.agent
index e974dc4..71f7009 100644 (file)
@@ -27,9 +27,14 @@ LABEL version=${AAF_VERSION}
 COPY bin/client.sh /opt/app/aaf_config/bin/agent.sh
 COPY bin/pod_wait.sh /opt/app/aaf_config/bin/pod_wait.sh
 COPY bin/aaf-cadi-aaf-${JAR_VERSION}-full.jar /opt/app/aaf_config/bin/
-COPY bin/aaf-cadi-servlet-sample-*-sample.jar /opt/app/aaf_config/bin/
+#COPY bin/aaf-cadi-servlet-sample-*-sample.jar /opt/app/aaf_config/bin/
 COPY cert/*trust*.b64 /opt/app/aaf_config/cert/
-RUN chmod 755 /opt/app/aaf_config/bin/* &&\
-    if [ -n "${DUSER}" ]; then chown -R ${DUSER}:${DUSER} /opt/app/aaf_config; fi
-USER ${DUSER}
+
 CMD []
+
+RUN mkdir -p /opt/app/osaaf/local && \
+     if [ -n "${DUSER}" ]; then \
+      addgroup ${DUSER} && adduser ${DUSER} -G ${DUSER} -D -s /bin/bash; \
+      chown ${DUSER}:${DUSER} /opt/app/osaaf/local; \
+    fi
+# Note: User added if in d.props