#-------------------------------------------------------------------------------
# Dockerfile
# ============LICENSE_START=======================================================
-# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+# Modifications Copyright (C) 2022 Nordix Foundation.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
#-------------------------------------------------------------------------------
-FROM onap/policy-jdk-alpine:2.2.0
+FROM onap/policy-jdk-alpine:2.6.2-SNAPSHOT
LABEL maintainer="Policy Team"
+LABEL org.opencontainers.image.title="Policy Drools PDP"
+LABEL org.opencontainers.image.description="Policy Drools PDP image based on Alpine"
+LABEL org.opencontainers.image.url="https://github.com/onap/policy-drools-pdp"
+LABEL org.opencontainers.image.vendor="ONAP Policy Team"
+LABEL org.opencontainers.image.licenses="Apache-2.0"
+LABEL org.opencontainers.image.created="${git.build.time}"
+LABEL org.opencontainers.image.version="${git.build.version}"
+LABEL org.opencontainers.image.revision="${git.commit.id.abbrev}"
ARG BUILD_VERSION_DROOLS=${BUILD_VERSION_DROOLS}
ARG POLICY_LOGS=/var/log/onap/policy/pdpd
ENV MVN_RELEASE_REPO_URL $MVN_RELEASE_REPO_URL
ENV http_proxy $http_proxy
+USER root
RUN apk update && \
- apk add --no-cache python3 \
- mariadb-client py3-pip \
- file dpkg httpie \
+ apk add --no-cache mariadb-client \
+ file \
+ maven \
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==1.0.3 \
- && rm -r /root/.cache
+ && 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
WORKDIR $POLICY_INSTALL
USER policy:policy
-SHELL ["/bin/ash", "-c"]
+SHELL ["/bin/sh", "-c"]
RUN unzip -o install-drools.zip && \
rm install-drools.zip && \
chown -R policy:policy * && \
chmod 600 $POLICY_HOME/config/* && \
rm -f $POLICY_INSTALL/*.conf && \
. $POLICY_HOME/etc/profile.d/env.sh && \
- $POLICY_HOME/bin/features install healthcheck distributed-locking lifecycle && \
+ $POLICY_HOME/bin/features install healthcheck distributed-locking lifecycle no-locking legacy-config && \
$POLICY_HOME/bin/features enable lifecycle && \
find $HOME/.m2/ -name _maven.repositories -exec rm -v {} \; && \
find $HOME/.m2/ -name _remote.repositories -exec rm -v {} \; && \