From ac1f04d47846385a239ef96a12bc7c80de4310db Mon Sep 17 00:00:00 2001 From: "Eduardo Ramos Testillano (ert)" Date: Sun, 25 Jul 2021 16:28:49 +0200 Subject: [PATCH] Simplify ADML-HTTP image UX --- CMakeLists.txt | 2 +- docker-images/anna-adml-http/Dockerfile | 6 ++++++ docker-images/anna-adml-http/starter.sh | 3 +-- tools/build-anna-adml-http | 7 ++++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 293ef7f..9647c33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ enable_language(C CXX) # Project version set(VERSION_MAJOR 1) set(VERSION_MINOR 0) -set(VERSION_PATCH 1) +set(VERSION_PATCH 2) # Dynamic libraries not linked to build tree: set(CMAKE_SKIP_RPATH TRUE) diff --git a/docker-images/anna-adml-http/Dockerfile b/docker-images/anna-adml-http/Dockerfile index c155c3e..382ab57 100644 --- a/docker-images/anna-adml-http/Dockerfile +++ b/docker-images/anna-adml-http/Dockerfile @@ -19,6 +19,12 @@ EXPOSE 8074 WORKDIR /opt/adml #ENV TZ=Europe/Madrid +ENV LD_LIBRARY_PATH=/opt/adml/dynlibs + +# Simplify docker image UX: +RUN rm args.* operation.sh start.sh stop.sh +RUN mv *.md utils ENTRYPOINT ["sh", "/var/starter.sh"] CMD [] + diff --git a/docker-images/anna-adml-http/starter.sh b/docker-images/anna-adml-http/starter.sh index cd4c629..63fcb29 100644 --- a/docker-images/anna-adml-http/starter.sh +++ b/docker-images/anna-adml-http/starter.sh @@ -1,8 +1,7 @@ #!/bin/sh # Start ADML agent: -cd /opt/adml -./start.sh $@ +./ADML $@ & # Execute nginx server: exec $(which nginx) -c /etc/nginx/nginx.conf -g "daemon off;" diff --git a/tools/build-anna-adml-http b/tools/build-anna-adml-http index a7e7e4d..7d72295 100755 --- a/tools/build-anna-adml-http +++ b/tools/build-anna-adml-http @@ -31,9 +31,10 @@ rm -rf ${AD} echo ${AD} | ${REPO_DIR}/example/diameter/launcher/deploy-adml-http.sh ${VARIANT} || exit 1 # Add interesting stuff: -cp -r ${REPO_DIR}/example/diameter/launcher/resources/rest_api/helpers/diameterJsonHelper ${AD} -cp ${REPO_DIR}/example/diameter/pcapDecoder/tsharkDecoder.sh ${AD} -cp ${REPO_DIR}/example/diameter/launcher/resources/scripts/decode.sh ${AD} +mkdir ${AD}/utils +cp -r ${REPO_DIR}/example/diameter/launcher/resources/rest_api/helpers/diameterJsonHelper ${AD}/utils +cp ${REPO_DIR}/example/diameter/pcapDecoder/tsharkDecoder.sh ${AD}/utils +cp ${REPO_DIR}/example/diameter/launcher/resources/scripts/decode.sh ${AD}/utils echo echo "Generate docker image ..." -- 2.20.1