Remove GPLv3 components from drools-pdp 25/123525/4
authorJim Hahn <jrh3@att.com>
Tue, 24 Aug 2021 21:30:57 +0000 (17:30 -0400)
committerJim Hahn <jrh3@att.com>
Wed, 25 Aug 2021 20:01:26 +0000 (16:01 -0400)
The drools-pdp docker image includes GNU tar, which is GPLv3 and is
therefore disallowed by ONAP.  Appears to be included with "dpkg", which
isn't needed anymore, so just removed it.
Switched to newer policy/docker image, which includes python3, thus no
longer need to install it.
Also stopped installing httpie via apk and only install it via pip, now.

Issue-ID: POLICY-2845
Change-Id: I08b97b90aef6820135b052c20f270f8b487c94a9
Signed-off-by: Jim Hahn <jrh3@att.com>
packages/docker/src/main/docker/Dockerfile

index 691fc66..25db853 100644 (file)
@@ -18,7 +18,7 @@
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 #-------------------------------------------------------------------------------
-FROM onap/policy-jdk-alpine:2.2.1
+FROM onap/policy-jdk-alpine:2.3.0
 
 LABEL maintainer="Policy Team"
 
@@ -42,15 +42,11 @@ ENV MVN_RELEASE_REPO_URL $MVN_RELEASE_REPO_URL
 ENV http_proxy $http_proxy
 
 RUN apk update && \
-    apk add --no-cache python3 \
-    mariadb-client py3-pip \
-    file dpkg httpie \
+    apk add --no-cache mariadb-client \
+    file \
     net-tools netcat-openbsd sudo less vim openssl \
-    && update-alternatives --install /usr/bin/python python /usr/bin/python3 0 \
-    && update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 \
-    && pip install --no-cache-dir --upgrade setuptools http-prompt \
-    && pip uninstall -y httpie \
-    && pip install --no-cache-dir httpie
+    && python3 -m pip install --no-cache-dir --upgrade setuptools http-prompt \
+    && python3 -m pip install --no-cache-dir httpie
 
 RUN mkdir -p $POLICY_CONFIG $POLICY_LOGS $POLICY_INSTALL_INIT && \
     chown -R policy:policy $POLICY_HOME $POLICY_LOGS $POLICY_INSTALL