From f332fb5030503d73c7cfa13eae351716b496f896 Mon Sep 17 00:00:00 2001 From: Daniel Kim <58484522+uruwhy@users.noreply.github.com> Date: Thu, 28 Aug 2025 14:13:14 -0400 Subject: [PATCH 1/4] Use updated golang version in dockerfile --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1c131d6c1..a572ccc57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,9 +40,15 @@ COPY --from=ui-build /usr/src/app/plugins/magma/dist /usr/src/app/plugins/magma/ # From https://docs.docker.com/build/building/best-practices/ # Install caldera dependencies RUN apt-get update && \ -apt-get --no-install-recommends -y install git curl unzip python3-dev python3-pip golang-go mingw-w64 zlib1g gcc && \ +apt-get --no-install-recommends -y install git curl unzip python3-dev python3-pip mingw-w64 zlib1g gcc && \ rm -rf /var/lib/apt/lists/* +# Install Golang from source (apt version is too out-of-date) +RUN curl -k -L https://go.dev/dl/go1.25.0.linux-amd64.tar.gz -o go1.25.0.linux-amd64.tar.gz && \ +tar -C /usr/local -xzf go1.25.0.linux-amd64.tar.gz +ENV PATH="$PATH:/usr/local/go/bin" +RUN go version + # Fix line ending error that can be caused by cloning the project in a Windows environment RUN cd /usr/src/app/plugins/sandcat; tr -d '\15\32' < ./update-agents.sh > ./update-agents.sh @@ -52,7 +58,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \ echo $TZ > /etc/timezone # Install pip requirements -RUN pip3 install --break-system-packages --no-cache-dir -r requirements.txt +RUN pip3 install --break-system-packages --no-cache-dir -r requirements.txt # For offline atomic (disable it by default in slim image) # Disable atomic if this is not downloaded From 8341f027665e0d7df106315766726d82973ca67c Mon Sep 17 00:00:00 2001 From: Daniel Kim <58484522+uruwhy@users.noreply.github.com> Date: Thu, 28 Aug 2025 15:02:00 -0400 Subject: [PATCH 2/4] fix update-agents script tr --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a572ccc57..a98a17777 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,7 +50,9 @@ ENV PATH="$PATH:/usr/local/go/bin" RUN go version # Fix line ending error that can be caused by cloning the project in a Windows environment -RUN cd /usr/src/app/plugins/sandcat; tr -d '\15\32' < ./update-agents.sh > ./update-agents.sh +# RUN cd /usr/src/app/plugins/sandcat && \ +cp ./update-agents.sh ./update-agents_orig.sh && \ +tr -d '\15\32' < ./update-agents_orig.sh > ./update-agents.sh # Set timezone (default to UTC) ARG TZ="UTC" From 91373adef8502716054d3aadbbae4bd1000f2102 Mon Sep 17 00:00:00 2001 From: Daniel Kim <58484522+uruwhy@users.noreply.github.com> Date: Thu, 28 Aug 2025 15:41:53 -0400 Subject: [PATCH 3/4] uncomment --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a98a17777..d1ffc0cd5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,7 +50,7 @@ ENV PATH="$PATH:/usr/local/go/bin" RUN go version # Fix line ending error that can be caused by cloning the project in a Windows environment -# RUN cd /usr/src/app/plugins/sandcat && \ +RUN cd /usr/src/app/plugins/sandcat && \ cp ./update-agents.sh ./update-agents_orig.sh && \ tr -d '\15\32' < ./update-agents_orig.sh > ./update-agents.sh From f2e9647da526d32ea4f1b2cf86178d89514336b9 Mon Sep 17 00:00:00 2001 From: Daniel Matthews <58484522+uruwhy@users.noreply.github.com> Date: Mon, 6 Oct 2025 12:37:05 -0400 Subject: [PATCH 4/4] Update Dockerfile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d1ffc0cd5..b9085b342 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,7 +45,7 @@ rm -rf /var/lib/apt/lists/* # Install Golang from source (apt version is too out-of-date) RUN curl -k -L https://go.dev/dl/go1.25.0.linux-amd64.tar.gz -o go1.25.0.linux-amd64.tar.gz && \ -tar -C /usr/local -xzf go1.25.0.linux-amd64.tar.gz +tar -C /usr/local -xzf go1.25.0.linux-amd64.tar.gz && rm go1.25.0.linux-amd64.tar.gz ENV PATH="$PATH:/usr/local/go/bin" RUN go version