Add client cert PEM files for authenticated requests
[dmaap/buscontroller.git] / dbc-client / src / main / resources / Dockerfile
index 1e49e42..9baa481 100644 (file)
@@ -26,12 +26,24 @@ COPY /opt /opt
 
 WORKDIR /opt/app/dbc-client
 
-#RUN apk add --no-cache curl
+# Install AAF CA certificate
+RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
+RUN mkdir -p /usr/local/share/ca-certificates && \
+    mv misc/aaf-ca.crt /usr/local/share/ca-certificates/aaf-ca.crt
+RUN update-ca-certificates
 
-RUN chmod +x /opt/app/dbc-client/misc/cert-client-init.sh && \
-    chmod +x /opt/app/dbc-client/bin/* && \
+# Install curl
+RUN apk add --no-cache curl
+
+# Install client certs for curl and openssl
+RUN apk add --no-cache openssl
+RUN mkdir -p /opt/app/osaaf/local  && \
+    mv etc/org.onap.dmaap-bc.p12 /opt/app/osaaf/local && \
+    mv etc/*.pem /opt/app/osaaf/local
+
+RUN chmod +x /opt/app/dbc-client/bin/* && \
     mkdir /opt/app/dbc-client/logs
 
 VOLUME /opt/app/dbc-client/log
 
-ENTRYPOINT ["sh", "./bin/dbc-client", "deploy"]
+ENTRYPOINT ["sh", "./bin/dbc-client" ]