# the builder has: git, wget, cmake, gcc/g++, make, python2/3. v7 dropped nng support
#
ARG CONTAINER_PULL_REGISTRY=nexus3.o-ran-sc.org:10001
# the builder has: git, wget, cmake, gcc/g++, make, python2/3. v7 dropped nng support
#
ARG CONTAINER_PULL_REGISTRY=nexus3.o-ran-sc.org:10001
-COPY e2sm_examples/kpm_e2sm/e2sim_1.0.0_amd64.deb /playpen
-COPY e2sm_examples/kpm_e2sm/e2sim-dev_1.0.0_amd64.deb /playpen
+COPY asn1c/ /playpen/e2sim/asn1c
+COPY e2sm_examples/ /playpen/e2sim/e2sm_examples
+COPY src/ /playpen/e2sim/src
+COPY CMakeLists.txt /playpen/e2sim
-RUN dpkg -i e2sim_1.0.0_amd64.deb e2sim-dev_1.0.0_amd64.deb
+RUN mkdir /playpen/e2sim/build && cd /playpen/e2sim/build && cmake .. && make package && cmake .. -DDEV_PKG=1 && make package
+
+RUN dpkg -i /playpen/e2sim/build/e2sim_1.0.0_amd64.deb /playpen/e2sim/build/e2sim-dev_1.0.0_amd64.deb
+
+RUN rm -rf /playpen/e2sim
RUN mkdir /usr/local/include/nlohmann
RUN git clone https://github.com/azadkuh/nlohmann_json_release.git
RUN mkdir /usr/local/include/nlohmann
RUN git clone https://github.com/azadkuh/nlohmann_json_release.git