From 00439237deac98d454c0a599c892411dba66b679 Mon Sep 17 00:00:00 2001 From: Vadim Grinco Date: Thu, 19 Jan 2023 13:55:55 +0000 Subject: [PATCH 1/6] Initial commit that works on ARM systems Signed-off-by: Vadim Grinco --- Dockerfile | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index b195c3d..773952f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,12 @@ -# Use Ubuntu LTS -FROM ubuntu:22.04 +# Use latest ubuntu version with ffmpeg5 +FROM ubuntu:22.10 -# Define download location variables - -ARG FILE_LOCATION="https://ispyfiles.azureedge.net/downloads/Agent_Linux64_4_4_6_0.zip" +#Define download location variables +ARG FILE_LOCATION="https://ispyfiles.azureedge.net/downloads/Agent_LinuxARM64_4_2_9_0.zip" ENV FILE_LOCATION_SET=${FILE_LOCATION:+true} -ENV DEFAULT_FILE_LOCATION="https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=Linux64&fromVersion=0" +ENV DEFAULT_FILE_LOCATION="https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=LinuxARM64&fromVersion=0" ARG DEBIAN_FRONTEND=noninteractive ARG TZ=America/Los_Angeles ARG name @@ -25,7 +24,7 @@ RUN if [ "${FILE_LOCATION_SET}" = "true" ]; then \ else \ #Get latest instead echo "Downloading latest" && \ - wget -c $(wget -qO- "https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=Linux64&fromVersion=0" | tr -d '"') -O agent.zip; \ + wget -c $(wget -qO- "https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=LinuxARM64&fromVersion=0" | tr -d '"') -O agent.zip; \ fi && \ unzip agent.zip -d /agent && \ rm agent.zip @@ -34,11 +33,7 @@ RUN if [ "${FILE_LOCATION_SET}" = "true" ]; then \ RUN apt-get install -y libgdiplus # Install ffmpeg -RUN add-apt-repository -y ppa:savoury1/ffmpeg4 && \ - add-apt-repository -y ppa:savoury1/ffmpeg5 && \ - apt-get update && \ - apt-get upgrade -y && \ - apt-get install -y ffmpeg +RUN apt-get install -y ffmpeg # Install Time Zone RUN apt-get install -y tzdata From d909db41510cc1afdceb584c23f9e1fbe6c0c5b4 Mon Sep 17 00:00:00 2001 From: Vadim Grinco Date: Mon, 30 Jan 2023 20:46:18 +0000 Subject: [PATCH 2/6] Implemented multiarchitecture support Signed-off-by: Vadim Grinco --- Dockerfile | 51 +++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 773952f..a7fe4ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,34 +1,10 @@ # Use latest ubuntu version with ffmpeg5 FROM ubuntu:22.10 -#Define download location variables - -ARG FILE_LOCATION="https://ispyfiles.azureedge.net/downloads/Agent_LinuxARM64_4_2_9_0.zip" - -ENV FILE_LOCATION_SET=${FILE_LOCATION:+true} -ENV DEFAULT_FILE_LOCATION="https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=LinuxARM64&fromVersion=0" -ARG DEBIAN_FRONTEND=noninteractive -ARG TZ=America/Los_Angeles -ARG name - - # Download and install dependencies RUN apt-get update \ && apt-get install -y wget unzip software-properties-common alsa-utils -# Download/Install iSpy Agent DVR: -# Check if we were given a specific version -RUN if [ "${FILE_LOCATION_SET}" = "true" ]; then \ - echo "Downloading from specific location: ${FILE_LOCATION}" && \ - wget -c ${FILE_LOCATION} -O agent.zip; \ - else \ - #Get latest instead - echo "Downloading latest" && \ - wget -c $(wget -qO- "https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=LinuxARM64&fromVersion=0" | tr -d '"') -O agent.zip; \ - fi && \ - unzip agent.zip -d /agent && \ - rm agent.zip - # Install libgdiplus, used for smart detection RUN apt-get install -y libgdiplus @@ -41,6 +17,33 @@ RUN apt-get install -y tzdata # Install curl, used for calling external webservices in Commands RUN apt-get install -y curl + +#Define download location variables +ARG FILE_LOCATION= +ENV FILE_LOCATION_SET=${FILE_LOCATION:+true} +ENV DEFAULT_FILE_LOCATION="https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=Linux64&fromVersion=0" +ARG DEBIAN_FRONTEND=noninteractive +ARG TZ=America/Los_Angeles +ARG name + +# Download/Install iSpy Agent DVR: +# Check if we were given a specific version +RUN if [ "${FILE_LOCATION_SET}" = "true" ]; then \ + echo "Downloading from specific location: ${FILE_LOCATION}" && \ + wget -c ${FILE_LOCATION} -O agent.zip; \ + else \ + #Get latest instead + arch=`dpkg --print-architecture` && \ + echo "Adjusting for architecture for $arch" && \ + if [ "$arch" = "arm64" ]; then \ + DEFAULT_FILE_LOCATION=`echo $DEFAULT_FILE_LOCATION | sed -e 's/Linux64/LinuxARM64/'`; \ + fi && \ + echo "Downloading latest" && \ + wget -c $(wget -qO- ${DEFAULT_FILE_LOCATION} | tr -d '"') -O agent.zip; \ + fi && \ + unzip agent.zip -d /agent && \ + rm agent.zip + # Clean up RUN apt-get -y --purge remove unzip wget \ && apt autoremove -y \ From b28c2f5fe8f77f2d984e4b4e6a503fe019cdc49c Mon Sep 17 00:00:00 2001 From: Vadim Grinco Date: Tue, 31 Jan 2023 12:40:35 +0100 Subject: [PATCH 3/6] Cleaned up the code. Signed-off-by: Vadim Grinco --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7fe4ef..7bc66de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,10 +33,10 @@ RUN if [ "${FILE_LOCATION_SET}" = "true" ]; then \ wget -c ${FILE_LOCATION} -O agent.zip; \ else \ #Get latest instead - arch=`dpkg --print-architecture` && \ - echo "Adjusting for architecture for $arch" && \ + arch=$(dpkg --print-architecture) && \ + echo "Adjusting architecture to $arch" && \ if [ "$arch" = "arm64" ]; then \ - DEFAULT_FILE_LOCATION=`echo $DEFAULT_FILE_LOCATION | sed -e 's/Linux64/LinuxARM64/'`; \ + DEFAULT_FILE_LOCATION=$(echo ${DEFAULT_FILE_LOCATION} | sed -e 's/Linux64/LinuxARM64/'); \ fi && \ echo "Downloading latest" && \ wget -c $(wget -qO- ${DEFAULT_FILE_LOCATION} | tr -d '"') -O agent.zip; \ From 720540d938b9da36f22e883fbef720d6c86066a8 Mon Sep 17 00:00:00 2001 From: Vadim Grinco Date: Wed, 15 Feb 2023 16:35:36 +0000 Subject: [PATCH 4/6] Adjusting the arch for the specific archive when given Signed-off-by: Vadim Grinco --- Dockerfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9f75a89..d4bf932 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN apt-get install -y curl #Define download location variables -ARG FILE_LOCATION="https://ispyfiles.azureedge.net/downloads/Agent_Linux64_4_4_9_0.zip" +ENV FILE_LOCATION="https://ispyfiles.azureedge.net/downloads/Agent_Linux64_4_4_9_0.zip" ENV FILE_LOCATION_SET=${FILE_LOCATION:+true} ENV DEFAULT_FILE_LOCATION="https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=Linux64&fromVersion=0" ARG DEBIAN_FRONTEND=noninteractive @@ -27,17 +27,20 @@ ARG TZ=America/Los_Angeles ARG name # Download/Install iSpy Agent DVR: -# Check if we were given a specific version -RUN if [ "${FILE_LOCATION_SET}" = "true" ]; then \ +# Detect the arch +RUN arch=$(dpkg --print-architecture) && \ + echo "Adjusting architecture to $arch" && \ + if [ "$arch" = "arm64" ]; then \ + DEFAULT_FILE_LOCATION=$(echo ${DEFAULT_FILE_LOCATION} | sed -e 's/Linux64/LinuxARM64/'); \ + FILE_LOCATION=$(echo ${FILE_LOCATION} | sed -e 's/Linux64/LinuxARM64/'); \ + fi &&\ + # Check if we were given a specific version + if [ "${FILE_LOCATION_SET}" = "true" ]; then \ echo "Downloading from specific location: ${FILE_LOCATION}" && \ wget -c ${FILE_LOCATION} -O agent.zip; \ else \ #Get latest instead arch=$(dpkg --print-architecture) && \ - echo "Adjusting architecture to $arch" && \ - if [ "$arch" = "arm64" ]; then \ - DEFAULT_FILE_LOCATION=$(echo ${DEFAULT_FILE_LOCATION} | sed -e 's/Linux64/LinuxARM64/'); \ - fi && \ echo "Downloading latest" && \ wget -c $(wget -qO- ${DEFAULT_FILE_LOCATION} | tr -d '"') -O agent.zip; \ fi && \ From 71bdaef8fa654fafcb38b2887042a7fb19c2d0e9 Mon Sep 17 00:00:00 2001 From: Vadim Grinco Date: Fri, 31 Mar 2023 12:50:31 +0000 Subject: [PATCH 5/6] Bumped to 4.6.6.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d4bf932..a088e92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN apt-get install -y curl #Define download location variables -ENV FILE_LOCATION="https://ispyfiles.azureedge.net/downloads/Agent_Linux64_4_4_9_0.zip" +ENV FILE_LOCATION="https://ispyfiles.azureedge.net/downloads/Agent_Linux64_4_6_6_0.zip" ENV FILE_LOCATION_SET=${FILE_LOCATION:+true} ENV DEFAULT_FILE_LOCATION="https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=Linux64&fromVersion=0" ARG DEBIAN_FRONTEND=noninteractive From b84387147d6f98ca06fe2bee175154df3ecd717c Mon Sep 17 00:00:00 2001 From: Vadim Grinco Date: Mon, 24 Apr 2023 21:15:45 +0000 Subject: [PATCH 6/6] Update to 4_7_2_0 Signed-off-by: Vadim Grinco --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a088e92..d6323ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN apt-get install -y curl #Define download location variables -ENV FILE_LOCATION="https://ispyfiles.azureedge.net/downloads/Agent_Linux64_4_6_6_0.zip" +ENV FILE_LOCATION="https://ispyfiles.azureedge.net/downloads/Agent_Linux64_4_7_2_0.zip" ENV FILE_LOCATION_SET=${FILE_LOCATION:+true} ENV DEFAULT_FILE_LOCATION="https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=Linux64&fromVersion=0" ARG DEBIAN_FRONTEND=noninteractive