From 5b3c7f62d4468757bebc31d4056d70e6c2f1014c Mon Sep 17 00:00:00 2001 From: murat Date: Fri, 7 Jul 2023 17:35:40 +0300 Subject: [PATCH 1/2] Add auto download feature --- docker/Dockerfile_Process | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile_Process b/docker/Dockerfile_Process index f25b2dec..1f3f92e5 100644 --- a/docker/Dockerfile_Process +++ b/docker/Dockerfile_Process @@ -5,6 +5,7 @@ FROM ubuntu:20.04 ARG AntMediaServer +ARG LicenseKey ARG BranchName=master @@ -20,7 +21,13 @@ RUN cd home \ RUN cd home \ && pwd \ - && ./install_ant-media-server.sh -i ${AntMediaServer} -s false + && if [ -n "$AntMediaServer" ]; then \ + ./install_ant-media-server.sh -i ${AntMediaServer} -s false; \ + fi \ + && if [ -n "$LicenseKey" ]; then \ + ./install_ant-media-server.sh -l ${LicenseKey} -s false; \ + fi + # Options From df403bd1bfa5a4bcecfc12ceaaa2ef49885950a4 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Sat, 16 Sep 2023 08:15:29 +0300 Subject: [PATCH 2/2] Refactor Dockerfile for conditional AntMediaServer and LicenseKey installation --- docker/Dockerfile_Process | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile_Process b/docker/Dockerfile_Process index 1f3f92e5..dd1534af 100644 --- a/docker/Dockerfile_Process +++ b/docker/Dockerfile_Process @@ -19,17 +19,17 @@ RUN cd home \ && wget https://raw.githubusercontent.com/ant-media/Scripts/${BranchName}/install_ant-media-server.sh \ && chmod 755 install_ant-media-server.sh -RUN cd home \ +RUN cd /home \ && pwd \ && if [ -n "$AntMediaServer" ]; then \ ./install_ant-media-server.sh -i ${AntMediaServer} -s false; \ - fi \ - && if [ -n "$LicenseKey" ]; then \ + elif [ -n "$LicenseKey" ]; then \ ./install_ant-media-server.sh -l ${LicenseKey} -s false; \ + else \ + echo "Both AntMediaServer and LicenseKey arguments are not provided. Aborting the build process."; \ + exit 1; \ fi - - # Options # -g: Use global(Public) IP in network communication. Its value can be true or false. Default value is false. #