CMD_DOCKER_ARGS ?= -q
DOCKER_ARGS = $(CMD_DOCKER_ARGS)
-DEPS := MON IM LCM RO common osmclient devops NBI
+DEPS := MON IM LCM RO common osmclient devops NBI POL
DEPS_TARGETS = $(addprefix $(MKBUILD)/.dep_, $(DEPS))
--build-arg COMMON_VERSION==$(shell cat $(MKBUILD)/.dep_common) \
--build-arg OSMCLIENT_VERSION==$(shell cat $(MKBUILD)/.dep_osmclient) \
--build-arg NBI_VERSION==$(shell cat $(MKBUILD)/.dep_NBI) \
+ --build-arg POL_VERSION==$(shell cat $(MKBUILD)/.dep_POL) \
$(DOCKER_ARGS) .
clean:
&& apt-get --yes install python3 python3-pip libmysqlclient-dev git \
&& pip3 install pip==9.0.3
-RUN git clone https://osm.etsi.org/gerrit/osm/MON MON
-#COPY requirements.txt /policy_module/requirements.txt
+RUN apt-get update && apt-get -y install curl software-properties-common
-RUN pip3 install -r /MON/policy_module/requirements.txt
+RUN apt-get --yes update \
+ && apt-get --yes install git python python-pip python3 python3-pip libmysqlclient-dev libssl-dev libffi-dev \
+ && pip3 install pip==9.0.3
+
+ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
+ARG RELEASE=ReleaseFOUR-daily
+ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
+ARG REPOSITORY=testing
+
+RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add -
+RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} POL common" && apt update
+
+ARG POL_VERSION
+ARG COMMON_VERSION
-RUN pip3 install /MON/policy_module
+RUN apt-get --yes update && apt-get -y install python3-osm-policy-module${POL_VERSION}
-CMD bash /MON/policy_module/scripts/gen_config_from_env.sh && osm-policy-agent --config osm_policy_agent.cfg
+#CMD bash /MON/policy_module/scripts/gen_config_from_env.sh && osm-policy-agent --config osm_policy_agent.cfg
include ../mk/Makefile.include
-# Currently LW-UI needs no-cache (binary version packages not yet available)
-DOCKER_ARGS += $(NO_CACHE)
-
MDG=$(shell basename $(CURDIR))